From 6e8c3ae6e9be38fdd1d1693b93c8629391799b19 Mon Sep 17 00:00:00 2001 From: Heinz Hoelzl Date: Thu, 10 Oct 2019 10:14:15 +1300 Subject: 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 Reviewed-by: Björn Baumbach Autobuild-User(master): Björn Baumbach Autobuild-Date(master): Wed Oct 23 15:54:43 UTC 2019 on sn-devel-184 --- python/samba/netcmd/user.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/samba/netcmd/user.py b/python/samba/netcmd/user.py index affbbf067c1..cadd80fd991 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: -- cgit v1.2.1