From 24dd497fd96e9e1cd5ffb94d5f226cfeeadc937e Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Tue, 26 Aug 2014 11:18:33 -0500 Subject: [PATCH] Catch more general socket.error. --- earwigbot/wiki/copyvios/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/earwigbot/wiki/copyvios/__init__.py b/earwigbot/wiki/copyvios/__init__.py index d9ee502..278c84d 100644 --- a/earwigbot/wiki/copyvios/__init__.py +++ b/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: