소스 검색

Catch errors around response.read().

tags/v0.2
Ben Kurtovic 9 년 전
부모
커밋
bdcbfa5327
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. +4
    -1
      earwigbot/wiki/copyvios/__init__.py

+ 4
- 1
earwigbot/wiki/copyvios/__init__.py 파일 보기

@@ -210,7 +210,10 @@ class _CopyvioWorker(object):
return None

with self._workspace.request_semaphore:
content = response.read()
try:
content = response.read()
except (URLError, error):
return None

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


불러오는 중...
취소
저장