Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d3c8e46

Browse files
committed
Minor layout adjustments
1 parent 660bf0b commit d3c8e46

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

lib/core/common.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,19 +1366,26 @@ def getBruteUnicode(string):
13661366

13671367
class UnicodeRawConfigParser(RawConfigParser):
13681368
def write(self, fp):
1369-
"""Write an .ini-format representation of the configuration state."""
1369+
"""
1370+
Write an .ini-format representation of the configuration state.
1371+
"""
1372+
13701373
if self._defaults:
13711374
fp.write("[%s]\n" % DEFAULTSECT)
1375+
13721376
for (key, value) in self._defaults.items():
13731377
fp.write("%s = %s\n" % (key, getUnicode(value).replace('\n', '\n\t')))
1378+
13741379
fp.write("\n")
1380+
13751381
for section in self._sections:
13761382
fp.write("[%s]\n" % section)
1383+
13771384
for (key, value) in self._sections[section].items():
13781385
if key != "__name__":
13791386
if value is None:
13801387
fp.write("%s\n" % (key))
13811388
else:
1382-
fp.write("%s = %s\n" %
1383-
(key, getUnicode(value).replace('\n', '\n\t')))
1389+
fp.write("%s = %s\n" % (key, getUnicode(value).replace('\n', '\n\t')))
1390+
13841391
fp.write("\n")

lib/core/option.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,15 @@ def __urllib2Opener():
9191
logger.debug(debugMsg)
9292

9393
handlers = [proxyHandler, authHandler, redirectHandler]
94+
9495
if not conf.dropSetCookie:
9596
conf.cj = cookielib.LWPCookieJar()
9697
handlers.append(urllib2.HTTPCookieProcessor(conf.cj))
98+
9799
if conf.keepAlive:
98100
handlers.append(keepAliveHandler)
99101

100-
opener = urllib2.build_opener(*handlers)
102+
opener = urllib2.build_opener(*handlers)
101103
urllib2.install_opener(opener)
102104

103105
def __feedTargetsDict(reqFile, addedTargetUrls):
@@ -702,7 +704,6 @@ def __setHTTPExtraHeaders():
702704

703705
if header and value:
704706
conf.httpHeaders.append((header, value))
705-
706707
else:
707708
conf.httpHeaders.append(("Accept", "text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5"))
708709
conf.httpHeaders.append(("Accept-Language", "en-us,en;q=0.5"))

0 commit comments

Comments
 (0)