URL: https://github.com/freeipa/freeipa/pull/844 Author: frasertweedale Title: #844: py3: fix regression in schemaupdate Action: opened
PR body: """ The python-ldap classes that process schema definitions require a unicode string, not a byte string. A recent py3 compatibility fix (d89de4219d0e8ee33e81d6b6d1bc6c22ac9ffbaa) changed the constructor argument to a unicode string to dispel a warning, but this broke schema update. Change it back to a bytestring. Part of: https://fedorahosted.org/freeipa/ticket/4985 """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/844/head:pr844 git checkout pr844
From 5805bee6479e511d1deb6ed90764b27064f82cdc Mon Sep 17 00:00:00 2001 From: Fraser Tweedale <ftwee...@redhat.com> Date: Fri, 2 Jun 2017 12:49:45 +1000 Subject: [PATCH] py3: fix regression in schemaupdate The python-ldap classes that process schema definitions require a unicode string, not a byte string. A recent py3 compatibility fix (d89de4219d0e8ee33e81d6b6d1bc6c22ac9ffbaa) changed the constructor argument to a unicode string to dispel a warning, but this broke schema update. Change it back to a bytestring. Part of: https://fedorahosted.org/freeipa/ticket/4985 --- ipaserver/install/schemaupdate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipaserver/install/schemaupdate.py b/ipaserver/install/schemaupdate.py index 935e576454..6efbb1f5e8 100644 --- a/ipaserver/install/schemaupdate.py +++ b/ipaserver/install/schemaupdate.py @@ -119,7 +119,7 @@ def update_schema(schema_files, ldapi=False, dm_password=None,): # The exact representation the DS gives us for each OID # (for debug logging) - old_entries_by_oid = {cls(attr.decode('utf-8')).oid: attr.decode('utf-8') + old_entries_by_oid = {cls(attr).oid: attr.decode('utf-8') for (attrname, cls) in SCHEMA_ELEMENT_CLASSES for attr in schema_entry[attrname]}
_______________________________________________ FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org