app: clarify error message on failed domain remove (used somewhere)

Point to system logs for more details. Do not include them directly in
the message for privacy reasons (Admin API client may not be given
permission to it).

QubesOS/qubes-issues#3273
QubesOS/qubes-issues#3193
This commit is contained in:
Marek Marczykowski-Górecki 2017-10-28 23:24:30 +02:00
parent 08584ce370
commit 59cebd5439
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -1196,7 +1196,9 @@ class Qubes(qubes.PropertyHolder):
self.log.error(
'Cannot remove %s, used by %s.%s',
vm, obj, prop.__name__)
raise qubes.exc.QubesVMInUseError(vm)
raise qubes.exc.QubesVMInUseError(vm,
'Domain is in use: {!r}; details in system log'
.format(vm.name))
except AttributeError:
pass