Skip to content

Commit

Permalink
Merge pull request #102 from 3c2b2ff5/master
Browse files Browse the repository at this point in the history
convert all members of a group to string

Issue #101
  • Loading branch information
jaqx0r authored Nov 5, 2019
2 parents 10d12e3 + 29b901c commit 9665918
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions nss_cache/sources/ldapsource.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,10 @@ def __iter__(self):
# If the dn is requested, return it along with the payload,
# otherwise ignore it.
for key in record[1]:
if isinstance(record[1][key][0], bytes) and key != 'objectSid':
value = record[1][key][0].decode('utf-8')
record[1][key] = [value]
for i in range(len(record[1][key])):
if isinstance(record[1][key][i], bytes) and key != 'objectSid':
value = record[1][key][i].decode('utf-8')
record[1][key][i] = value
if self._dn_requested:
merged_records = {'dn': record[0]}
merged_records.update(record[1])
Expand Down

0 comments on commit 9665918

Please sign in to comment.