A new exception for requiring root, RootRequired

This commit is contained in:
Rob Crittenden
2009-02-18 17:12:14 -05:00
parent 4476f6b939
commit 83d5987db9

View File

@@ -710,6 +710,22 @@ class RealmMismatch(ExecutionError):
errno = 4005
format = _('The realm for the principal does not match the realm for this IPA server')
class RequiresRoot(ExecutionError):
"""
**4006** Raised when a command requires the unix super-user to run
For example:
>>> raise RequiresRoot
Traceback (most recent call last):
...
RequiresRoot: This command requires root access
"""
errno = 4006
format = _('This command requires root access')
class BuiltinError(ExecutionError):
"""
**4100** Base class for builtin execution errors (*4100 - 4199*).