Sfoglia il codice sorgente

Put response.read() in the try:, since that's what throws the timeout.

tags/v0.2
Ben Kurtovic 11 anni fa
parent
commit
5931f375de
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. +1
    -1
      earwigbot/wiki/copyvios/__init__.py

+ 1
- 1
earwigbot/wiki/copyvios/__init__.py Vedi File

@@ -63,9 +63,9 @@ class CopyvioMixIn(object):
"""
try:
response = self._opener.open(url.encode("utf8"), timeout=5)
result = response.read()
except (URLError, timeout):
return None
result = response.read()

if response.headers.get("Content-Encoding") == "gzip":
stream = StringIO(result)


Caricamento…
Annulla
Salva