Skip to content
Snippets Groups Projects
Commit a4a4ba1e authored by Dennis Ahrens's avatar Dennis Ahrens
Browse files

[TASk] Fixes bug in LDAP extractor.

The last commit introduced a bug, that will be
fixed with this commit.
UnitTests now ran through again.
parent 37813797
No related branches found
No related tags found
No related merge requests found
...@@ -205,6 +205,9 @@ class LdapExtractor(AbstractExtractor): ...@@ -205,6 +205,9 @@ class LdapExtractor(AbstractExtractor):
row = {'dn': dn} row = {'dn': dn}
for key, value in entry.items(): for key, value in entry.items():
logging.debug('%s %s' % (key, value)) logging.debug('%s %s' % (key, value))
if type(value) != list:
value = unicode(value.decode(self.connector.encoding))
else:
value = map(lambda v: unicode(v.decode(self.connector.encoding)), value) value = map(lambda v: unicode(v.decode(self.connector.encoding)), value)
if len(value) is 1: value = value[0] if len(value) is 1: value = value[0]
row[key] = value row[key] = value
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment