The Samba-Bugzilla – Attachment 15549 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]
4.10 patch with (backported from...)
bug-14154-4-10-v2.patch (text/plain), 1.56 KB, created by
Douglas Bagnall
on 2019-10-16 00:26:11 UTC
(
hide
)
Description:
4.10 patch with (backported from...)
Filename:
MIME Type:
Creator:
Douglas Bagnall
Created:
2019-10-16 00:26:11 UTC
Size:
1.56 KB
patch
obsolete
>From d1f9b8ea6af8cc4cd312b2fb559ddffde1939d8a 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> >(backported from commit 3923f929e5e70a045edfafa34eee3cb0331c2a5f) >--- > 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