qubes/vm/qubesvm: Simplify error message
This commit is contained in:
parent
f915115cfb
commit
ecb626d64b
@ -1095,9 +1095,9 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM):
|
|||||||
def remove_from_disk(self):
|
def remove_from_disk(self):
|
||||||
'''Remove domain remnants from disk.'''
|
'''Remove domain remnants from disk.'''
|
||||||
if not self.is_halted():
|
if not self.is_halted():
|
||||||
msg = "Can't remove, vm {!s}, beacuse it's in state {!s}."
|
raise qubes.exc.QubesVMNotHaltedError(
|
||||||
msg = msg.format(self, self.get_power_state())
|
"Can't remove VM {!s}, beacuse it's in state {!r}.".format(
|
||||||
raise qubes.exc.QubesVMNotHaltedError(msg)
|
self, self.get_power_state()))
|
||||||
|
|
||||||
self.fire_event('domain-remove-from-disk')
|
self.fire_event('domain-remove-from-disk')
|
||||||
shutil.rmtree(self.dir_path)
|
shutil.rmtree(self.dir_path)
|
||||||
|
Loading…
Reference in New Issue
Block a user