dom0/qvm-shutdown: catch QubesException
This commit is contained in:
parent
3063ef35b7
commit
6219c1b7ed
@ -20,7 +20,7 @@
|
||||
#
|
||||
#
|
||||
|
||||
from qubes.qubes import QubesVmCollection
|
||||
from qubes.qubes import QubesVmCollection,QubesException
|
||||
from optparse import OptionParser;
|
||||
import sys
|
||||
|
||||
@ -48,7 +48,7 @@ def main():
|
||||
|
||||
try:
|
||||
vm.shutdown(force=options.force)
|
||||
except (IOError, OSError) as err:
|
||||
except (IOError, OSError, QubesException) as err:
|
||||
print >> sys.stderr, "ERROR: {0}".format(err)
|
||||
exit (1)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user