mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
add new error class for certificate operations
add new error class for certificate operations
This commit is contained in:
parent
76fc1f75f9
commit
0d880b3ee3
@ -89,7 +89,9 @@ current block assignments:
|
|||||||
|
|
||||||
- **4200 - 4299** `LDAPError` and its subclasses
|
- **4200 - 4299** `LDAPError` and its subclasses
|
||||||
|
|
||||||
- **4300 - 4999** *Reserved for future use*
|
- **4300 - 4399** `CertificateError` and its subclasses
|
||||||
|
|
||||||
|
- **4400 - 4999** *Reserved for future use*
|
||||||
|
|
||||||
- **5000 - 5999** `GenericError` and its subclasses
|
- **5000 - 5999** `GenericError` and its subclasses
|
||||||
|
|
||||||
@ -1155,6 +1157,31 @@ class ObjectclassViolation(ExecutionError):
|
|||||||
format = _('%(info)s')
|
format = _('%(info)s')
|
||||||
|
|
||||||
|
|
||||||
|
class CertificateError(ExecutionError):
|
||||||
|
"""
|
||||||
|
**4300** Base class for Certificate execution errors (*4300 - 4399*).
|
||||||
|
"""
|
||||||
|
|
||||||
|
errno = 4300
|
||||||
|
|
||||||
|
|
||||||
|
class CertificateOperationError(ExecutionError):
|
||||||
|
"""
|
||||||
|
**4301** Raised when a certificate operation cannot be completed
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
>>> raise CertificateOperationError(error=u'bad serial number')
|
||||||
|
Traceback (most recent call last):
|
||||||
|
...
|
||||||
|
CertificateOperationError: Certificate operation cannot be completed: bad serial number
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
errno = 4301
|
||||||
|
format = _('Certificate operation cannot be completed: %(error)s')
|
||||||
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# 5000 - 5999: Generic errors
|
# 5000 - 5999: Generic errors
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user