Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

remove duplicate context factory handling for non-ssl support in http1.0

Daniel Grañab34606030dff
diff --git a/scrapy/core/downloader/handlers/http.py b/scrapy/core/downloader/handlers/http.py
index 7d91f1fb7..9f3799c59 100644
--- a/scrapy/core/downloader/handlers/http.py
+++ b/scrapy/core/downloader/handlers/http.py
@@ -1,9 +1,9 @@
-"""Download handlers for http and https schemes"""
-
+"""Download handlers for http and https schemes
+"""
from twisted.internet import reactor
-
from scrapy.utils.misc import load_object
+
class HttpDownloadHandler(object):
def __init__(self, settings):
@@ -19,7 +19,7 @@ class HttpDownloadHandler(object):
def _connect(self, factory):
host, port = factory.host, factory.port
if factory.scheme == 'https':
- return reactor.connectSSL(host, port, factory, \
- self.ClientContextFactory())
+ return reactor.connectSSL(host, port, factory,
+ self.ClientContextFactory())
else:
return reactor.connectTCP(host, port, factory)