The Samba-Bugzilla – Attachment 15547 Details for
Bug 14154
samba-tool user syncpasswords sync_command_p.communicate python3 bytes- like object is required
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for 4.10
bug-14154-4-10.patch (text/plain), 1.50 KB, created by
Douglas Bagnall
on 2019-10-16 00:07:51 UTC
(
hide
)
Description:
patch for 4.10
Filename:
MIME Type:
Creator:
Douglas Bagnall
Created:
2019-10-16 00:07:51 UTC
Size:
1.50 KB
patch
obsolete
>From ea9b7d41e77714942874e4608e9414c42372c440 Mon Sep 17 00:00:00 2001 >From: Heinz Hoelzl <heinz.hoelzl@gvcc.net> >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 <heinz.hoelzl@gvcc.net> >Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >--- > python/samba/netcmd/user.py | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/python/samba/netcmd/user.py b/python/samba/netcmd/user.py >index 8ead8e583f3..c22b2b35b33 100644 >--- a/python/samba/netcmd/user.py >+++ b/python/samba/netcmd/user.py >@@ -54,7 +54,7 @@ from samba.netcmd import ( > SuperCommand, > Option, > ) >-from samba.compat import text_type >+from samba.compat import text_type, PY3 > from samba.compat import get_bytes > from samba.compat import get_string > >@@ -1998,7 +1998,11 @@ samba-tool user syncpasswords --terminate \\ > assert res is None > > input = "%s" % (ldif) >- reply = sync_command_p.communicate(input)[0] >+ if PY3: >+ reply = sync_command_p.communicate( >+ input.encode('utf-8'))[0].decode('utf-8') >+ else: >+ reply = sync_command_p.communicate(input)[0] > log_msg("%s\n" % (reply)) > res = sync_command_p.poll() > if res is None: >-- >2.20.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 14154
:
15519
|
15523
|
15546
|
15547
|
15548
|
15549
|
15550