Make MalformedServicePrincipal take a reason arg and add Base64DecodeError

This commit is contained in:
Rob Crittenden committed 2009-05-06 11:29:11 -04:00
1 parent 5405c01025
commit 0d538b20f2
1 file changed
+19 -3
+19 -3
View File
@@ -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*).