]> git.phdru.name Git - bookmarks_db.git/blobdiff - Robots/bkmk_rurllib.py
Style: Fix flake8 E302 expected 2 blank lines, found 1
[bookmarks_db.git] / Robots / bkmk_rurllib.py
index 018896379ab4a4f2ca2bd59f10736bb975314777..3ef47eba975ac4d475306915ec862701d0f33c05 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,6 +71,7 @@ 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)
@@ -91,7 +93,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()