fallout from py_dsdb_DsReplicaAttribute to -> bytes
authorNoel Power <noel.power@suse.com>
Thu, 17 May 2018 12:34:00 +0000 (13:34 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 15 Sep 2018 13:18:26 +0000 (15:18 +0200)
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/join.py

index f111dcc8c3b9ea42cc2ce20c53f2438a4d621652..66a5641a08b614393080a888b36d3225e20a9929 100644 (file)
@@ -49,6 +49,7 @@ import time
 import re
 import os
 import tempfile
+from samba.compat import text_type
 
 
 class DCJoinException(Exception):
@@ -483,6 +484,7 @@ class DCJoinContext(object):
                     v = [rec[a]]
                 else:
                     v = rec[a]
+                v = [x.encode('utf8') if isinstance(x, text_type) else x for x in v]
                 rattr = ctx.tmp_samdb.dsdb_DsReplicaAttribute(ctx.tmp_samdb, a, v)
                 attrs.append(rattr)