diff options
author | Rob Crittenden <rcritten@redhat.com> | 2009-05-05 14:46:47 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2009-05-06 11:29:11 -0400 |
commit | 0d538b20f2b50c76a460be407b9be8a94ee379e9 (patch) | |
tree | 462f04b538d4bd64728826ccc22fdc01fbfb77f5 /ipalib/errors.py | |
parent | 5405c01025f9c13fe59edf9ca28758031bcfcf7f (diff) | |
download | freeipa-0d538b20f2b50c76a460be407b9be8a94ee379e9.tar.gz freeipa-0d538b20f2b50c76a460be407b9be8a94ee379e9.tar.xz freeipa-0d538b20f2b50c76a460be407b9be8a94ee379e9.zip |
Make MalformedServicePrincipal take a reason arg and add Base64DecodeError
Diffstat (limited to 'ipalib/errors.py')
-rw-r--r-- | ipalib/errors.py | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/ipalib/errors.py b/ipalib/errors.py index f626f359d..2e9eebeef 100644 --- a/ipalib/errors.py +++ b/ipalib/errors.py @@ -779,15 +779,15 @@ class MalformedServicePrincipal(ExecutionError): For example: - >>> raise MalformedServicePrincipal + >>> raise MalformedServicePrincipal(reason="missing service") Traceback (most recent call last): ... - MalformedServicePrincipal: Service principal is not of the form: service/fully-qualified host name + MalformedServicePrincipal: Service principal is not of the form: service/fully-qualified host name: missing service """ errno = 4004 - format = _('Service principal is not of the form: service/fully-qualified host name') + format = _('Service principal is not of the form: service/fully-qualified host name: %(reason)r') class RealmMismatch(ExecutionError): """ @@ -949,6 +949,22 @@ class AlreadyGroupMember(ExecutionError): errno = 4014 format = _('This entry is already a member of the group') +class Base64DecodeError(ExecutionError): + """ + **4015** Raised when a base64-encoded blob cannot decoded + + For example: + + >>> raise Base64DecodeError(reason="Incorrect padding") + Traceback (most recent call last): + ... + Base64DecodeError: Base64 decoding failed: Incorrect padding + + """ + + errno = 4015 + format = _('Base64 decoding failed: %(reason)r') + class BuiltinError(ExecutionError): """ **4100** Base class for builtin execution errors (*4100 - 4199*). |