Added ServiceError (KerberosError) and make rpc.KerbTransport raise it if appropriate

This commit is contained in:
Jason Gerard DeRose
2009-01-23 12:51:48 -07:00
committed by Rob Crittenden
parent 114b6b8577
commit 0313f03277
3 changed files with 28 additions and 3 deletions

View File

@@ -410,6 +410,23 @@ class KerberosError(AuthenticationError):
errno = 1100
class ServiceError(KerberosError):
"""
**1101** Raised when service is not found in Kerberos DB.
For example:
>>> raise ServiceError(service='HTTP@localhost')
Traceback (most recent call last):
...
ServiceError: Service 'HTTP@localhost' not found in Kerberos database
"""
errno = 1101
format = _('Service %(service)r not found in Kerberos database')
##############################################################################
# 2000 - 2999: Authorization errors