Skip to content

Commit

Permalink
Catch more exceptions
Browse files Browse the repository at this point in the history
run_service() can raise FileNotFoundError, so catch OSError and all of
its subclasses.  Also catch the more general subprocess.SubprocessError
instead of just subprocess.CalledProcessError.

Fixes: QubesOS/qubes-issues#8151
(cherry picked from commit 98053bd)
  • Loading branch information
DemiMarie authored and marmarek committed Jun 22, 2023
1 parent d930e56 commit 192c053
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qubesmanager/qube_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ def run(self):
pass
self.vm.run_service("qubes.InstallUpdatesGUI",
user="root", wait=False)
except (ChildProcessError, subprocess.CalledProcessError,
except (OSError, subprocess.SubprocessError,
exc.QubesException) as ex:
self.msg = (self.tr("Error on qube update!"), str(ex))

Expand Down

0 comments on commit 192c053

Please sign in to comment.