Some little python code to visualize an LDAP structure.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

24 lines
720 B

"""
Common things for all possible transports...
Currently our only transport is TCP but in theory there might be others...
Author: Georg Hopp <ghopp@spamtitan.com>
"""
class Error(Exception):
"""
This simplifies all the possible transport problems down to two cases.
Either the transport has failed completely or the remote side has shutdown
it's endpoint for the operation we are attemting.
"""
ERR_FAILED = 1
ERR_REMOTE_CLOSE = 2
messages = {
ERR_FAILED : 'transport operation failed',
ERR_REMOTE_CLOSE : 'remote endpoint closed'
}
def __init__(self, errno):
super(Error, self).__init__(Error.messages[errno])
self.errno = errno