summaryrefslogtreecommitdiffstats
path: root/ipaserver/install
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2017-01-31 19:23:39 +0100
committerJan Cholasta <jcholast@redhat.com>2017-02-10 14:03:04 +0100
commit47f912e16ba6de2f3579de610b0d902cf3e621a2 (patch)
tree604b219ee602315c11db274bbf60113ce9f9d65d /ipaserver/install
parent7fd36e4d3651f327a8c3a2f13b92a2a304352dfd (diff)
downloadfreeipa-47f912e16ba6de2f3579de610b0d902cf3e621a2.tar.gz
freeipa-47f912e16ba6de2f3579de610b0d902cf3e621a2.tar.xz
freeipa-47f912e16ba6de2f3579de610b0d902cf3e621a2.zip
py3: upgradeinstance: use bytes literals with LDIF operations
python ldif support only bytes as values, literals must be bytes https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipaserver/install')
-rw-r--r--ipaserver/install/upgradeinstance.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ipaserver/install/upgradeinstance.py b/ipaserver/install/upgradeinstance.py
index 8e6c87d8b..fca4226d5 100644
--- a/ipaserver/install/upgradeinstance.py
+++ b/ipaserver/install/upgradeinstance.py
@@ -162,7 +162,7 @@ class IPAUpgrade(service.Service):
parser = installutils.ModifyLDIF(in_file, out_file)
parser.replace_value(
- "cn=config", "nsslapd-global-backend-lock", ["on"])
+ "cn=config", "nsslapd-global-backend-lock", [b"on"])
parser.parse()
shutil.copy2(ldif_outfile, self.filename)
@@ -199,8 +199,8 @@ class IPAUpgrade(service.Service):
with open(ldif_outfile, "w") as out_file:
with open(self.filename, "r") as in_file:
parser = installutils.ModifyLDIF(in_file, out_file)
- parser.replace_value("cn=config", "nsslapd-port", ["0"])
- parser.replace_value("cn=config", "nsslapd-security", ["off"])
+ parser.replace_value("cn=config", "nsslapd-port", [b"0"])
+ parser.replace_value("cn=config", "nsslapd-security", [b"off"])
parser.remove_value("cn=config", "nsslapd-ldapientrysearchbase")
parser.parse()