1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 reverse = None
19 LDAPOther = None
20
21 -def get(resultCode, errorMessage):
29
33
40
43 Exception.__init__(self)
44 self.message=message
45
47 message=self.message
48 if message:
49 return '%s: %s' % (self.name, message)
50 elif self.name:
51 return self.name
52 else:
53 return 'Unknown LDAP error %r' % self
54
55
57 resultCode=None
58
59 - def __init__(self, resultCode, message=None):
64
66 codeName='unknownError(%d)'%self.code
67 if self.message:
68 return '%s: %s' % (codeName, self.message)
69 else:
70 return codeName
71
72 import new
88
89 init(
90 success=0,
91 operationsError=1,
92 protocolError=2,
93 timeLimitExceeded=3,
94 sizeLimitExceeded=4,
95 compareFalse=5,
96 compareTrue=6,
97 authMethodNotSupported=7,
98 strongAuthRequired=8,
99
100 referral=10 ,
101 adminLimitExceeded=11 ,
102 unavailableCriticalExtension=12 ,
103 confidentialityRequired=13 ,
104 saslBindInProgress=14 ,
105 noSuchAttribute=16,
106 undefinedAttributeType=17,
107 inappropriateMatching=18,
108 constraintViolation=19,
109 attributeOrValueExists=20,
110 invalidAttributeSyntax=21,
111
112 noSuchObject=32,
113 aliasProblem=33,
114 invalidDNSyntax=34,
115
116 aliasDereferencingProblem=36,
117
118 inappropriateAuthentication=48,
119 invalidCredentials=49,
120 insufficientAccessRights=50,
121 busy=51,
122 unavailable=52,
123 unwillingToPerform=53,
124 loopDetect=54,
125
126 namingViolation=64,
127 objectClassViolation=65,
128 notAllowedOnNonLeaf=66,
129 notAllowedOnRDN=67,
130 entryAlreadyExists=68,
131 objectClassModsProhibited=69,
132
133 affectsMultipleDSAs=71,
134
135 other=80,
136
137 )
138
139 other=LDAPOther.resultCode
140