From 53b2b30c0aa85880ebea7152a179153a014182d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 17 Aug 2016 02:13:59 +0200 Subject: [PATCH] qubes: fix some error messages --- qubes/app.py | 4 +--- qubes/vm/__init__.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/qubes/app.py b/qubes/app.py index ff6a0a81..ddbbc4ba 100644 --- a/qubes/app.py +++ b/qubes/app.py @@ -440,9 +440,7 @@ class VMCollection(object): def __delitem__(self, key): vm = self[key] if not vm.is_halted(): - msg = "Can't remove, vm {!s}, beacuse it's in state {!s}." - msg = msg.format(vm, vm.get_power_state()) - raise qubes.exc.QubesVMNotHaltedError(msg) + raise qubes.exc.QubesVMNotHaltedError(vm) self.app.fire_event_pre('domain-pre-delete', vm) try: vm.libvirt_domain.undefine() diff --git a/qubes/vm/__init__.py b/qubes/vm/__init__.py index 77fae4ef..cc6b6c43 100644 --- a/qubes/vm/__init__.py +++ b/qubes/vm/__init__.py @@ -501,7 +501,7 @@ class VMProperty(qubes.property): raise qubes.exc.QubesVMNotFoundError(value) if not isinstance(vm, self.vmclass): - raise TypeError('wrong VM class: domains[{!r}] if of type {!s} ' + raise TypeError('wrong VM class: domains[{!r}] is of type {!s} ' 'and not {!s}'.format(value, vm.__class__.__name__, self.vmclass.__name__))