mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
py3: pass raw entries to LDIFWriter
LDIFWriter.unparse() expects the scalar values of the attributes of the entries to be bytes as it applies a byte regular expression to check whether to base64-encode the values or not. Previously, we were passing the scalar attribute values as strings which was breaking the LDIFWriter.unparse() exectution. https://pagure.io/freeipa/issue/7131 Reviewed-By: Felipe Barreto <fbarreto@redhat.com>
This commit is contained in:
parent
d39456a882
commit
71a8026496
@ -1045,7 +1045,7 @@ def _entries_to_ldif(entries):
|
||||
io = StringIO()
|
||||
writer = LDIFWriter(io)
|
||||
for entry in entries:
|
||||
writer.unparse(str(entry.dn), dict(entry))
|
||||
writer.unparse(str(entry.dn), dict(entry.raw))
|
||||
return io.getvalue()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user