Fix py3 "bytes input" needed when parsing xml (issues-1)

This commit is contained in:
Alvaro Uria 2019-02-12 12:02:28 +01:00
parent 7f882e9438
commit 869bff2581

View File

@ -192,7 +192,7 @@ class KeystoneSAMLMellonConfigurationAdapter(
with open(idp_metadata_path) as f:
content = f.read()
try:
etree.fromstring(content)
etree.fromstring(content.encode())
self._idp_metadata = content
self._validation_errors['idp-metadata'] = None
except etree.XMLSyntaxError:
@ -212,7 +212,7 @@ class KeystoneSAMLMellonConfigurationAdapter(
with open(info_path) as f:
content = f.read()
try:
etree.fromstring(content)
etree.fromstring(content.encode())
self._sp_signing_keyinfo = content
self._validation_errors['sp-signing-keyinfo'] = None
except etree.XMLSyntaxError: