diff --git a/earwigbot/wiki/copyvios/__init__.py b/earwigbot/wiki/copyvios/__init__.py index 759f43c..8b906f9 100644 --- a/earwigbot/wiki/copyvios/__init__.py +++ b/earwigbot/wiki/copyvios/__init__.py @@ -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)