From 3923f929e5e70a045edfafa34eee3cb0331c2a5f Mon Sep 17 00:00:00 2001 From: Heinz Hoelzl Date: Thu, 10 Oct 2019 10:14:15 +1300 Subject: [PATCH] samba-tool: py3 compatiblity in 'user syncpasswords --daemon' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BUG: https://bugzilla.samba.org/show_bug.cgi?id=14154 Signed-off-by: Heinz Hölzl Reviewed-by: Douglas Bagnall --- python/samba/netcmd/user.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/samba/netcmd/user.py b/python/samba/netcmd/user.py index 6730ab718de..117b6cfc5df 100644 --- a/python/samba/netcmd/user.py +++ b/python/samba/netcmd/user.py @@ -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: -- 2.20.1