From caf750dccc92065f05568f8217985ccaa3af2146 Mon Sep 17 00:00:00 2001 From: Lukas Puehringer Date: Tue, 24 Sep 2019 12:46:09 +0200 Subject: [PATCH 1/2] Remove bogus self-assignment Seems to be an artifact of a feature-removal (compression) in 8de5c69f395c9e6e4d1cf4fb58c60a123f030b36. Signed-off-by: Lukas Puehringer --- tuf/client/updater.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tuf/client/updater.py b/tuf/client/updater.py index 1be42ee7e6..f9f18dabaf 100755 --- a/tuf/client/updater.py +++ b/tuf/client/updater.py @@ -1728,7 +1728,6 @@ def _update_metadata(self, metadata_role, upperbound_filelength, version=None): # Construct the metadata filename as expected by the download/mirror # modules. metadata_filename = metadata_role + '.json' - metadata_filename = metadata_filename # Attempt a file download from each mirror until the file is downloaded and # verified. If the signature of the downloaded file is valid, proceed, From 3f417b34b8b9b8b95a165bd601002188244acded Mon Sep 17 00:00:00 2001 From: Lukas Puehringer Date: Tue, 24 Sep 2019 12:49:50 +0200 Subject: [PATCH 2/2] Use default "_" for consecutive unused var assign Pylint now has a "redeclared-assigned-name" check that gets triggered if we re-use our custom "junk" unused var name. It does not if we use the "_" default unused var name. So let's use "_" then. Signed-off-by: Lukas Puehringer --- tuf/log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuf/log.py b/tuf/log.py index f10fb585c7..4db16b5caf 100755 --- a/tuf/log.py +++ b/tuf/log.py @@ -173,7 +173,7 @@ def filter(self, record): # file logging handler, the user may always consult the file log for the # original exception traceback. The exc_info is explained here: # http://docs.python.org/2/library/sys.html#sys.exc_info - exc_type, junk, junk = record.exc_info + exc_type, _, _ = record.exc_info # Simply set the class name as the exception text. record.exc_text = exc_type.__name__