mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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>
This commit is contained in:
parent
7fd36e4d36
commit
47f912e16b
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user