python/samba/netcmd: PY3 port samba.tests.samba_tool.edit
authorNoel Power <noel.power@suse.com>
Wed, 10 Oct 2018 18:19:24 +0000 (19:19 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 14 Nov 2018 04:07:16 +0000 (05:07 +0100)
Need to write bytes to file

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/netcmd/user.py

index 0b8314dd1ca32b044e92f272e969c2f95e3ec2bf..447f1a345f697ccb4f6ca83fe785c452e503a515 100644 (file)
@@ -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])