mirror of
https://github.com/samba-team/samba.git
synced 2025-12-12 12:23:50 +03:00
python/schema: Fix conversion to UTF-8 string
str(b'foo') yields "b'foo'", which is wrong. Fix this to get "foo" instead. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
committed by
Andrew Bartlett
parent
9e6f3df5d8
commit
4c6bd559ff
@@ -221,7 +221,7 @@ def get_linked_attributes(schemadn, schemaldb):
|
||||
attribute="lDAPDisplayName",
|
||||
scope=SCOPE_SUBTREE)
|
||||
if target is not None:
|
||||
attributes[str(res[i]["lDAPDisplayName"])] = str(target)
|
||||
attributes[str(res[i]["lDAPDisplayName"])] = target.decode('utf-8')
|
||||
|
||||
return attributes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user