Skip to content

Commit

Permalink
Make pylint happy about handle_exception
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
marmarek committed Oct 31, 2019
1 parent c228df1 commit bae3298
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion qubesmanager/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ def backup_location_changed(self, new_dir=None):
# Copyright (c) 2002-2007 Pascal Varet <[email protected]>

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)

Expand Down
2 changes: 1 addition & 1 deletion qubesmanager/global_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def save_and_apply(self):
# Copyright (c) 2002-2007 Pascal Varet <[email protected]>

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)

Expand Down
2 changes: 1 addition & 1 deletion qubesmanager/qube_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion qubesmanager/restore.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion qubesmanager/template_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit bae3298

Please sign in to comment.