Browse Source

Catch HTTPException in opener.open.

tags/v0.2
Ben Kurtovic 10 years ago
parent
commit
3f2dd1094f
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      earwigbot/wiki/copyvios/workers.py

+ 2
- 1
earwigbot/wiki/copyvios/workers.py View File

@@ -22,6 +22,7 @@


from collections import deque from collections import deque
from gzip import GzipFile from gzip import GzipFile
from httplib import HTTPException
from logging import getLogger from logging import getLogger
from math import log from math import log
from Queue import Empty, Queue from Queue import Empty, Queue
@@ -126,7 +127,7 @@ class _CopyvioWorker(object):
url = source.url.encode("utf8") url = source.url.encode("utf8")
try: try:
response = self._opener.open(url, timeout=source.timeout) response = self._opener.open(url, timeout=source.timeout)
except (URLError, socket_error):
except (URLError, HTTPException, socket_error):
return None return None


try: try:


Loading…
Cancel
Save