string.lower

master
Бородин Роман 2018-04-26 14:26:59 +03:00
parent be7a0a914c
commit 62d5f96624
1 changed files with 2 additions and 3 deletions

View File

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