in asfpy/ldapadmin.py [0:0]
def stringify(ldiff):
""" Convert all values in a dict to string """
for k, v in ldiff.items():
# Convert single-list to string
if type(v) is list and len(v) == 1:
v = v[0]
if type(v) is list:
n = 0
for xv in v:
if type(v[n]) is bytes:
v[n] = xv.decode('utf-8')
n += 1
else:
if type(v) is bytes:
v = v.decode('utf-8')
ldiff[k] = v
return ldiff