Skip to content

Commit

Permalink
Fix too-narrow exception caught in qvm_shutdown
Browse files Browse the repository at this point in the history
Instead of QubesVMNotStartedError, QubesVMNotRunningError
(which is a subclass) was being caught, which led to
unintended error raised on shutting down an
already-shut down VM.

fixes QubesOS/qubes-issues#3032
  • Loading branch information
marmarta committed Sep 9, 2021
1 parent f186f7a commit 3f8200e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qubesadmin/tools/qvm_shutdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def main(args=None, app=None): # pylint: disable=missing-docstring
for vm in this_round_domains:
try:
vm.shutdown(force=force)
except qubesadmin.exc.QubesVMNotRunningError:
except qubesadmin.exc.QubesVMNotStartedError:
pass
except qubesadmin.exc.QubesException as e:
if not args.wait:
Expand Down

0 comments on commit 3f8200e

Please sign in to comment.