samba-tool: py3 compatiblity in 'user syncpasswords --daemon'
authorHeinz Hoelzl <heinz.hoelzl@gvcc.net>
Wed, 9 Oct 2019 21:14:15 +0000 (10:14 +1300)
committerBjörn Baumbach <bb@sernet.de>
Wed, 23 Oct 2019 15:54:43 +0000 (15:54 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14154

Signed-off-by: Heinz Hölzl <heinz.hoelzl@gvcc.net>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Björn Baumbach <bb@sernet.de>
Autobuild-User(master): Björn Baumbach <bb@sernet.de>
Autobuild-Date(master): Wed Oct 23 15:54:43 UTC 2019 on sn-devel-184

python/samba/netcmd/user.py

index affbbf067c149f7b8fdfd14c9cfc5d16692a829d..cadd80fd991fc4288c817b49c68398c7be893110 100644 (file)
@@ -1958,7 +1958,8 @@ samba-tool user syncpasswords --terminate \\
             assert res is None
 
             input = "%s" % (ldif)
-            reply = sync_command_p.communicate(input)[0]
+            reply = sync_command_p.communicate(
+                input.encode('utf-8'))[0].decode('utf-8')
             log_msg("%s\n" % (reply))
             res = sync_command_p.poll()
             if res is None: