From 0336c2504af45a87d2aae4c1ed45039c0e0ea183 Mon Sep 17 00:00:00 2001 From: Paul Tremberth Date: Wed, 24 Feb 2016 16:42:25 +0100 Subject: [PATCH] Use context factory class name in warning message --- scrapy/core/downloader/handlers/http11.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scrapy/core/downloader/handlers/http11.py b/scrapy/core/downloader/handlers/http11.py index 40ad2d814..00c09c75c 100644 --- a/scrapy/core/downloader/handlers/http11.py +++ b/scrapy/core/downloader/handlers/http11.py @@ -43,9 +43,10 @@ class HTTP11DownloadHandler(object): # use context factory defaults self._contextFactory = self._contextFactoryClass() 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.""" + '%s' does not accept `method` argument (type OpenSSL.SSL method,\ + e.g. OpenSSL.SSL.SSLv23_METHOD).\ + Please upgrade your context factory class to handle it or ignore it.""" % ( + settings['DOWNLOADER_CLIENTCONTEXTFACTORY'],) warnings.warn(msg) self._default_maxsize = settings.getint('DOWNLOAD_MAXSIZE') self._default_warnsize = settings.getint('DOWNLOAD_WARNSIZE')