From: Björn Jacke Date: Sat, 21 Sep 2019 11:24:59 +0000 (+0200) Subject: classicupgrade: fix a a bytes-like object is required, not 'str' error X-Git-Tag: talloc-2.3.1~740 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=465e518d6cc200eefa38643e720ce64e53abac2e;p=thirdparty%2Fsamba.git classicupgrade: fix a a bytes-like object is required, not 'str' error BUG: https://bugzilla.samba.org/show_bug.cgi?id=14136 Signed-off-by: Bjoern Jacke Reviewed-by: Björn Baumbach Autobuild-User(master): Björn Jacke Autobuild-Date(master): Mon Sep 23 12:58:20 UTC 2019 on sn-devel-184 --- diff --git a/python/samba/upgrade.py b/python/samba/upgrade.py index 12555b7994e..8511bed2868 100644 --- a/python/samba/upgrade.py +++ b/python/samba/upgrade.py @@ -474,7 +474,7 @@ def upgrade_from_samba3(samba3, logger, targetdir, session_info=None, ldappass = secrets_db.get_ldap_bind_pw(ldapuser) if ldappass is None: raise ProvisioningError("ldapsam passdb backend detected but no LDAP Bind PW found in secrets.tdb for user %s. Please point this tool at the secrets.tdb that was used by the previous installation.") - ldappass = ldappass.strip('\x00') + ldappass = ldappass.decode('utf-8').strip('\x00') ldap = True else: ldapuser = None