jenkins-bot has submitted this change and it was merged.
Change subject: pep8 fixes ......................................................................
pep8 fixes
Change-Id: Idcf98da719b78205c46f2b34f846d6eb22a840d1 --- M pywikibot/comms/http.py 1 file changed, 5 insertions(+), 4 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py index dcddc41..a8dc98f 100644 --- a/pywikibot/comms/http.py +++ b/pywikibot/comms/http.py @@ -39,7 +39,7 @@
# global variables
-# the User-agent: header. The default is +# the User-agent: header. The default is # '<script>/<revision> Pywikipediabot/2.0', where '<script>' is the currently # executing script and version is the SVN revision of Pywikipediabot. USER_AGENT_FORMAT = '{script}/r{version[rev]} Pywikipediabot/2.0' @@ -51,8 +51,7 @@ connection_pool = threadedhttp.ConnectionPool() http_queue = Queue.Queue()
-cookie_jar = threadedhttp.LockableCookieJar( - config.datafilepath("pywikibot.lwp")) +cookie_jar = threadedhttp.LockableCookieJar(config.datafilepath("pywikibot.lwp")) try: cookie_jar.load() except (IOError, cookielib.LoadError): @@ -69,6 +68,7 @@ threads.append(proc) proc.start()
+ # Prepare flush on quit def _flush(): for i in threads: @@ -81,6 +81,7 @@
# export cookie_jar to global namespace pywikibot.cookie_jar = cookie_jar +
def request(site, uri, ssl=False, *args, **kwargs): """Queue a request to be submitted to Site. @@ -120,6 +121,6 @@
if request.data[0].status != 200: pywikibot.warning(u"Http response status %(status)s" - % {'status': request.data[0].status}) + % {'status': request.data[0].status})
return request.data[1]