Browse Source

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
Marek Marczykowski-Górecki 6 years ago
parent
commit
59cebd5439
1 changed files with 3 additions and 1 deletions
  1. 3 1
      qubes/app.py

+ 3 - 1
qubes/app.py

@@ -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