Explorar o código

ext/admin: add explanation to PermissionDenied

Wojtek Porczyk %!s(int64=7) %!d(string=hai) anos
pai
achega
8c9ce0587b
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      qubes/ext/admin.py

+ 4 - 2
qubes/ext/admin.py

@@ -29,6 +29,8 @@ class AdminExtension(qubes.ext.Extension):
         '''Forbid changing specific tags'''
         # pylint: disable=no-self-use,unused-argument
         if arg.startswith('created-by-'):
-            raise qubes.api.PermissionDenied()
+            raise qubes.api.PermissionDenied(
+                'changing this tag is prohibited by {}.{}'.format(
+                    __name__, type(self).__name__))
 
-    # TODO create that extension in the first place
+    # TODO create that tag here (need to figure out how to pass mgmtvm name)