]> git.phdru.name Git - bookmarks_db.git/blobdiff - Robots/bkmk_rurllib.py
Style: Fix flake8 E305 expected 2 blank lines, found 1
[bookmarks_db.git] / Robots / bkmk_rurllib.py
index 018896379ab4a4f2ca2bd59f10736bb975314777..0045f2d9f428dae8a428bbdb021f65ff9c627483 100644 (file)
@@ -22,6 +22,7 @@ class RedirectException(Exception):
         self.errcode = errcode
         self.newurl = newurl
 
+
 class MyURLopener(urllib.URLopener):
     # Error 301 -- relocated (permanently)
     def http_error_301(self, url, fp, errcode, errmsg, headers, data=None):
@@ -70,12 +71,14 @@ urllib._urlopener.addheader('Connection', 'close')
 urllib_ftpwrapper = urllib.ftpwrapper
 ftpcache_key = None
 
+
 class myftpwrapper(urllib_ftpwrapper):
     def __init__(self, user, passwd, host, port, dirs):
         urllib_ftpwrapper.__init__(self, user, passwd, host, port, dirs)
         global ftpcache_key
         ftpcache_key = (user, host, port, '/'.join(dirs))
 
+
 urllib.ftpwrapper = myftpwrapper
 
 
@@ -91,7 +94,7 @@ class robot_urllib(robot_base):
                 fname, headers = urllib.urlretrieve(url)
             finally:
                 if accept_charset and bookmark.charset:
-                    del urllib._urlopener.addheaders[-1] # Remove Accept-Charset
+                    del urllib._urlopener.addheaders[-1]  # Remove Accept-Charset
 
             infile = open(fname, 'rb')
             content = infile.read()