From: Noel Power Date: Thu, 8 Nov 2018 18:47:59 +0000 (+0000) Subject: python/samba/kcc: PY3 fix some str versus ldb.bytes comparisons X-Git-Tag: tdb-1.3.17~447 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=750540fd5c2ca0a033373d637531a283a2be6ae6;p=thirdparty%2Fsamba.git python/samba/kcc: PY3 fix some str versus ldb.bytes comparisons Signed-off-by: Noel Power Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/kcc/kcc_utils.py b/python/samba/kcc/kcc_utils.py index 9959637836f..81d381abd99 100644 --- a/python/samba/kcc/kcc_utils.py +++ b/python/samba/kcc/kcc_utils.py @@ -669,7 +669,7 @@ class DirectoryServiceAgent(object): if "options" in msg: self.options = int(msg["options"][0]) - if "msDS-isRODC" in msg and msg["msDS-isRODC"][0] == "TRUE": + if "msDS-isRODC" in msg and str(msg["msDS-isRODC"][0]) == "TRUE": self.dsa_is_ro = True else: self.dsa_is_ro = False @@ -972,7 +972,7 @@ class NTDSConnection(object): self.options = int(msg["options"][0]) if "enabledConnection" in msg: - if msg["enabledConnection"][0].upper().lstrip().rstrip() == "TRUE": + if str(msg["enabledConnection"][0]).upper().lstrip().rstrip() == "TRUE": self.enabled = True if "systemFlags" in msg: @@ -1353,7 +1353,7 @@ class Partition(NamingContext): continue if k == "Enabled": - if msg[k][0].upper().lstrip().rstrip() == "TRUE": + if str(msg[k][0]).upper().lstrip().rstrip() == "TRUE": self.enabled = True else: self.enabled = False