]> git.phdru.name Git - bookmarks_db.git/blobdiff - Robots/bkmk_rurllib.py
Fix(Py3): Fix import from `urllib`
[bookmarks_db.git] / Robots / bkmk_rurllib.py
index 20b74239b8fb55fc184b08e2cf686ce8ca150983..1b3182ea04de146e44fe0ac219599a30517ca34e 100644 (file)
@@ -11,9 +11,7 @@ __license__ = "GNU GPL"
 __all__ = ['robot_urllib']
 
 
-import os
 import sys
-import time
 import urllib
 
 from Robots.bkmk_robot_base import robot_base, get_error
@@ -51,7 +49,7 @@ class MyURLopener(urllib.URLopener):
 
     def http_error_default(self, url, fp, errcode, errmsg, headers):
         if fp:
-            void = fp.read()
+            fp.read()
             fp.close()
         raise IOError(('http error', errcode, errmsg, headers))
 
@@ -117,7 +115,7 @@ class robot_urllib(robot_base):
             if (e[0] == "http error") and (e[1] == -1):
                 error = None
                 bookmark.no_error = "The server did not return any header - "
-                    "it is not an error, actually"
+                "it is not an error, actually"
                 self.log('   no headers: %s' % bookmark.no_error)
             else:
                 error = get_error(e)