projects
/
mirror
/
userdir-ldap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
a10f6e2
)
Catch the case where attributes that are not declared as an array value have more...
author
Peter Palfrader
<peter@palfrader.org>
Mon, 2 Aug 2010 20:14:40 +0000
(20:14 +0000)
committer
Peter Palfrader
<peter@palfrader.org>
Mon, 2 Aug 2010 20:15:42 +0000
(20:15 +0000)
UDLdap.py
patch
|
blob
|
history
diff --git
a/UDLdap.py
b/UDLdap.py
index
3dc2b74
..
9f8a0fd
100644
(file)
--- a/
UDLdap.py
+++ b/
UDLdap.py
@@
-31,7
+31,10
@@
class Account:
if key in self.array_values:
return self.attributes[key]
elif key in self.int_values:
- return int(self.attributes[key][0])
+ if len(self.attributes[key]) == 1:
+ return int(self.attributes[key][0])
+ else:
+ raise ValueError, 'non-array value has not exactly one value'
else:
return self.attributes[key][0]
elif key in self.defaults: