From 83d5987db917b8097ff80ba4df72db754cf4f943 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Wed, 18 Feb 2009 17:12:14 -0500 Subject: A new exception for requiring root, RootRequired --- ipalib/errors2.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'ipalib/errors2.py') diff --git a/ipalib/errors2.py b/ipalib/errors2.py index 6d26ee57..c80edf02 100644 --- a/ipalib/errors2.py +++ b/ipalib/errors2.py @@ -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*). -- cgit