From bae3298e00f18925ca82ce08577a9081ae16125a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Thu, 31 Oct 2019 05:30:56 +0100 Subject: [PATCH] Make pylint happy about handle_exception The master branch has a better fix, deduplicating this function. But code changes related to PyQt5 makes it non-trivial to backport. Fix the warning directly, in all the function copies. --- qubesmanager/backup.py | 2 +- qubesmanager/global_settings.py | 2 +- qubesmanager/qube_manager.py | 2 +- qubesmanager/restore.py | 2 +- qubesmanager/template_manager.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/qubesmanager/backup.py b/qubesmanager/backup.py index 455500e8..c250bae2 100644 --- a/qubesmanager/backup.py +++ b/qubesmanager/backup.py @@ -410,7 +410,7 @@ def backup_location_changed(self, new_dir=None): # Copyright (c) 2002-2007 Pascal Varet def handle_exception(exc_type, exc_value, exc_traceback): - filename, line, dummy, dummy = traceback.extract_tb(exc_traceback).pop() + filename, line, _, _ = traceback.extract_tb(exc_traceback).pop() filename = os.path.basename(filename) error = "%s: %s" % (exc_type.__name__, exc_value) diff --git a/qubesmanager/global_settings.py b/qubesmanager/global_settings.py index fdcee8a0..9e1f356e 100644 --- a/qubesmanager/global_settings.py +++ b/qubesmanager/global_settings.py @@ -303,7 +303,7 @@ def save_and_apply(self): # Copyright (c) 2002-2007 Pascal Varet def handle_exception(exc_type, exc_value, exc_traceback): - filename, line, dummy, dummy = traceback.extract_tb(exc_traceback).pop() + filename, line, _, _ = traceback.extract_tb(exc_traceback).pop() filename = os.path.basename(filename) error = "%s: %s" % (exc_type.__name__, exc_value) diff --git a/qubesmanager/qube_manager.py b/qubesmanager/qube_manager.py index f20410fa..e19f0317 100644 --- a/qubesmanager/qube_manager.py +++ b/qubesmanager/qube_manager.py @@ -1297,7 +1297,7 @@ def show_log(self, action): def handle_exception(exc_type, exc_value, exc_traceback): - filename, line, dummy, dummy = traceback.extract_tb(exc_traceback).pop() + filename, line, _, _ = traceback.extract_tb(exc_traceback).pop() filename = os.path.basename(filename) error = "%s: %s" % (exc_type.__name__, exc_value) diff --git a/qubesmanager/restore.py b/qubesmanager/restore.py index d8a4a276..4100b9b7 100644 --- a/qubesmanager/restore.py +++ b/qubesmanager/restore.py @@ -304,7 +304,7 @@ def backup_location_changed(self, new_dir=None): def handle_exception(exc_type, exc_value, exc_traceback): - filename, line, dummy, dummy = traceback.extract_tb(exc_traceback).pop() + filename, line, _, _ = traceback.extract_tb(exc_traceback).pop() filename = os.path.basename(filename) error = "%s: %s" % (exc_type.__name__, exc_value) diff --git a/qubesmanager/template_manager.py b/qubesmanager/template_manager.py index 88e1a082..1276f943 100644 --- a/qubesmanager/template_manager.py +++ b/qubesmanager/template_manager.py @@ -394,7 +394,7 @@ def vm_state_change(self, is_running, row=None): def handle_exception(exc_type, exc_value, exc_traceback): - filename, line, dummy, dummy = traceback.extract_tb(exc_traceback).pop() + filename, line, _, _ = traceback.extract_tb(exc_traceback).pop() filename = os.path.basename(filename) error = "%s: %s" % (exc_type.__name__, exc_value)