mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Make MalformedServicePrincipal take a reason arg and add Base64DecodeError
This commit is contained in:
@@ -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*).
|
||||
|
Reference in New Issue
Block a user