瀏覽代碼

Catch more general socket.error.

tags/v0.2
Ben Kurtovic 10 年之前
父節點
當前提交
24dd497fd9
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      earwigbot/wiki/copyvios/__init__.py

+ 2
- 2
earwigbot/wiki/copyvios/__init__.py 查看文件

@@ -24,7 +24,7 @@ from collections import namedtuple
from gzip import GzipFile
from math import log
from Queue import Empty, Queue
from socket import timeout
from socket import error
from StringIO import StringIO
from threading import Lock, Semaphore, Thread
from time import sleep, time
@@ -190,7 +190,7 @@ class _CopyvioWorker(object):
with self._workspace.request_semaphore:
try:
response = self._opener.open(url, timeout=self._url_timeout)
except (URLError, timeout):
except (URLError, error):
return None

try:


Loading…
取消
儲存