1
0
mirror of https://github.com/scrapy/scrapy.git synced 2025-02-25 12:03:58 +00:00

Make warning message a bit nicer in logs

This commit is contained in:
Paul Tremberth 2016-02-24 16:01:18 +01:00
parent c9890d5f76
commit c29a1b98b3

View File

@ -42,10 +42,11 @@ class HTTP11DownloadHandler(object):
except TypeError:
# use context factory defaults
self._contextFactory = self._contextFactoryClass()
warnings.warn("""
msg = """
You are using a context factory class that does not accept the `method` argument
(type OpenSSL.SSL method, e.g. OpenSSL.SSL.SSLv23_METHOD).
Please upgrade your context factory class to handle or ignore it.""")
Please upgrade your context factory class to handle or ignore it."""
warnings.warn(msg)
self._default_maxsize = settings.getint('DOWNLOAD_MAXSIZE')
self._default_warnsize = settings.getint('DOWNLOAD_WARNSIZE')
self._disconnect_timeout = 1