string.lower
parent
be7a0a914c
commit
62d5f96624
|
@ -2,7 +2,6 @@ import ldap
|
||||||
import ldif
|
import ldif
|
||||||
from ldap.cidict import cidict
|
from ldap.cidict import cidict
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
from string import lower
|
|
||||||
|
|
||||||
|
|
||||||
class CustomCidict(cidict):
|
class CustomCidict(cidict):
|
||||||
|
@ -10,8 +9,8 @@ class CustomCidict(cidict):
|
||||||
"""Override of the __getitem__ method to return an empty list if a key
|
"""Override of the __getitem__ method to return an empty list if a key
|
||||||
does not exist (instead of raising an exception)
|
does not exist (instead of raising an exception)
|
||||||
"""
|
"""
|
||||||
if lower(key) in self.data:
|
if key.lower() in self.data:
|
||||||
return self.data[lower(key)]
|
return self.data[key.lower()]
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue