From df6943c37f10d98a62ca95881116b8b4debda670 Mon Sep 17 00:00:00 2001 From: fedeG Date: Mon, 20 Apr 2015 18:06:51 +0200 Subject: PEP-8, Python Zen, refactor and reduce code (part 9 in master module/network) Conflicts: module/network/Bucket.py module/network/CookieJar.py pyload/network/Browser.py pyload/network/HTTPChunk.py pyload/network/HTTPDownload.py pyload/network/HTTPRequest.py pyload/network/RequestFactory.py pyload/network/XDCCRequest.py --- pyload/network/HTTPRequest.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pyload/network/HTTPRequest.py') diff --git a/pyload/network/HTTPRequest.py b/pyload/network/HTTPRequest.py index d87a3ee7e..1c645f898 100644 --- a/pyload/network/HTTPRequest.py +++ b/pyload/network/HTTPRequest.py @@ -76,7 +76,7 @@ class HTTPRequest(object): if hasattr(pycurl, "USE_SSL"): self.c.setopt(pycurl.USE_SSL, pycurl.CURLUSESSL_TRY) - #self.c.setopt(pycurl.VERBOSE, 1) + # self.c.setopt(pycurl.VERBOSE, 1) self.c.setopt(pycurl.USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0") @@ -254,8 +254,8 @@ class HTTPRequest(object): for line in header: line = line.lower().replace(" ", "") - if not line.startswith("content-type:") or\ - ("text" not in line and "application" not in line): + if not line.startswith("content-type:") or \ + ("text" not in line and "application" not in line): continue none, delemiter, charset = line.rpartition("charset=") @@ -265,7 +265,7 @@ class HTTPRequest(object): encoding = charset[0] try: - #self.log.debug("Decoded %s" % encoding ) + # self.log.debug("Decoded %s" % encoding ) if lookup(encoding).name == 'utf-8' and rep.startswith(BOM_UTF8): encoding = 'utf-8-sig' -- cgit v1.2.3