From 71a80264966070fb2e43c838e27875efca035a17 Mon Sep 17 00:00:00 2001 From: Stanislav Laznicka Date: Fri, 20 Oct 2017 15:32:34 +0200 Subject: [PATCH] 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 --- ipatests/pytest_plugins/integration/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipatests/pytest_plugins/integration/tasks.py b/ipatests/pytest_plugins/integration/tasks.py index 381c8b607..1b5612058 100644 --- a/ipatests/pytest_plugins/integration/tasks.py +++ b/ipatests/pytest_plugins/integration/tasks.py @@ -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()