From: Noel Power Date: Wed, 10 Oct 2018 18:19:24 +0000 (+0100) Subject: python/samba/netcmd: PY3 port samba.tests.samba_tool.edit X-Git-Tag: tdb-1.3.17~772 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fdb3aa487f0ceb9989959036efd98f54563cd3ce;p=thirdparty%2Fsamba.git python/samba/netcmd: PY3 port samba.tests.samba_tool.edit Need to write bytes to file Signed-off-by: Noel Power Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/netcmd/user.py b/python/samba/netcmd/user.py index 0b8314dd1ca..447f1a345f6 100644 --- a/python/samba/netcmd/user.py +++ b/python/samba/netcmd/user.py @@ -2421,7 +2421,7 @@ LDAP server using the 'nano' editor. editor = 'vi' with tempfile.NamedTemporaryFile(suffix=".tmp") as t_file: - t_file.write(result_ldif) + t_file.write(get_bytes(result_ldif)) t_file.flush() try: check_call([editor, t_file.name])