Added IOError to the list of exceptions to retry in the RetryMiddleware

This commit is contained in:
Pablo Hoffman 2011-04-12 18:12:36 -03:00
parent 7c49e8679c
commit 6f262a198c
1 changed files with 3 additions and 1 deletions

View File

@ -30,9 +30,11 @@ from scrapy.conf import settings
class RetryMiddleware(object):
# IOError is raised by the HttpCompression middleware when trying to
# decompress an empty response
EXCEPTIONS_TO_RETRY = (ServerTimeoutError, UserTimeoutError, DNSLookupError,
ConnectionRefusedError, ConnectionDone, ConnectError,
ConnectionLost, PartialDownloadError)
ConnectionLost, PartialDownloadError, IOError)
def __init__(self):
self.max_retry_times = settings.getint('RETRY_TIMES')