]> git.phdru.name Git - bookmarks_db.git/commitdiff
Style: Fix flake8 F841 local variable is assigned to but never used
authorOleg Broytman <phd@phdru.name>
Thu, 28 Sep 2023 12:21:50 +0000 (15:21 +0300)
committerOleg Broytman <phd@phdru.name>
Sun, 12 Nov 2023 19:21:09 +0000 (22:21 +0300)
Robots/bkmk_robot_base.py
Robots/bkmk_rurllib.py
Storage/bkmk_stjson.py
db2bkmk.py

index d6a87d31cd41682ee3d48549868442814a15cebe..3b5ec274760a59b3578e25a5bec87a7b7d09c7ac 100644 (file)
@@ -171,10 +171,10 @@ class robot_base(Robot):
                                 else:
                                     raise IOError("Too many redirects")
                             except:
-                                etype, emsg, tb = sys.exc_info()
+                                etype, emsg, _ = sys.exc_info()
                                 self.log("   no icon        : %s %s"
                                          % (etype, emsg))
-                                etype = emsg = tb = None
+                                etype = emsg = _ = None
                                 icons[icon_url] = None
                             else:
                                 content_type = icon_headers["Content-Type"]
index 55e0037e8999e261010d095af4eb1a9b61ad9852..1b3182ea04de146e44fe0ac219599a30517ca34e 100644 (file)
@@ -49,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))
 
index 0b34ecb079e005c41a4d37f29b0804129401185f..5022dfa12f00d158a3e3e0c33b32fd1ad02cbc67 100644 (file)
@@ -71,7 +71,7 @@ class storage_json(Walker):
         dict["lastModified"] = convert_date_to_json(b.last_modified)
         dict["title"] = b.name.decode('utf-8')
         dict["type"] = "text/x-moz-place"
-        dict["uri"] = uri = b.href
+        dict["uri"] = b.href
         self.folder_stack[-1].append(dict)
 
     def ruler(self, r, level):
index 7d9ab2cd6e8a65b0989f5828b3c4299f662307c7..4041690b285a7aa710d22d8f155de36e17ec7a09 100755 (executable)
@@ -63,7 +63,6 @@ def run():
         sys.stdout.flush()
 
     if transl:
-        new_ext = str(transl)
         transl_d = {}
 
         from m_lib.flad import fladm