py3: schemaupdate: fix BytesWarning

str() was called on bytes

https://fedorahosted.org/freeipa/ticket/4985

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
This commit is contained in:
Martin Basti 2017-02-10 19:02:35 +01:00
parent bc9addac30
commit d89de4219d

View File

@ -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(str(attr)).oid: str(attr)
old_entries_by_oid = {cls(attr.decode('utf-8')).oid: attr.decode('utf-8')
for (attrname, cls) in SCHEMA_ELEMENT_CLASSES
for attr in schema_entry[attrname]}