From 2e673dc1e4202710ca17ee2f6eab2dae721139ac Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 28 Sep 2023 15:21:50 +0300 Subject: [PATCH] Style: Fix flake8 F841 local variable is assigned to but never used --- Robots/bkmk_robot_base.py | 4 ++-- Robots/bkmk_rurllib.py | 2 +- Storage/bkmk_stjson.py | 2 +- db2bkmk.py | 1 - 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Robots/bkmk_robot_base.py b/Robots/bkmk_robot_base.py index d6a87d3..3b5ec27 100644 --- a/Robots/bkmk_robot_base.py +++ b/Robots/bkmk_robot_base.py @@ -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"] diff --git a/Robots/bkmk_rurllib.py b/Robots/bkmk_rurllib.py index 55e0037..1b3182e 100644 --- a/Robots/bkmk_rurllib.py +++ b/Robots/bkmk_rurllib.py @@ -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)) diff --git a/Storage/bkmk_stjson.py b/Storage/bkmk_stjson.py index 0b34ecb..5022dfa 100644 --- a/Storage/bkmk_stjson.py +++ b/Storage/bkmk_stjson.py @@ -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): diff --git a/db2bkmk.py b/db2bkmk.py index 7d9ab2c..4041690 100755 --- a/db2bkmk.py +++ b/db2bkmk.py @@ -63,7 +63,6 @@ def run(): sys.stdout.flush() if transl: - new_ext = str(transl) transl_d = {} from m_lib.flad import fladm -- 2.39.5