Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr/571'
Browse files Browse the repository at this point in the history
* origin/pr/571:
  Fix error message for non-existing VM passed to a VMProperty
  • Loading branch information
marmarek committed Dec 16, 2023
2 parents 6f38ace + 83b1959 commit fca4b99
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion qubes/vm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,10 @@ def __set__(self, instance, value):
try:
vm = app.domains[value]
except KeyError:
raise qubes.exc.QubesVMNotFoundError(value)
raise qubes.exc.QubesPropertyValueError(instance, self, value,
"Can't set {!s} to non-existing qube {!s}".format(
self,
value))

if not isinstance(vm, self.vmclass):
raise qubes.exc.QubesPropertyValueError(instance, self, value,
Expand Down

0 comments on commit fca4b99

Please sign in to comment.