diff options
author | Clint Byrum <clint@fewbar.com> | 2015-05-20 23:42:53 -0700 |
---|---|---|
committer | Clint Byrum <clint@fewbar.com> | 2015-05-21 00:13:26 -0700 |
commit | da21b279e2fa7d5c94ec370c02a7507f91d8ce43 (patch) | |
tree | 28b67cbf52153dd863dc88676ede973bd2b3aada /src/saml2/pack.py | |
parent | 153de086452652dfb9a81f466e30f2ff305d371a (diff) | |
download | pysaml2-da21b279e2fa7d5c94ec370c02a7507f91d8ce43.tar.gz |
Fix xml issues with python3
Some calls in etree will return bytes where they used to return a string
type.
Diffstat (limited to 'src/saml2/pack.py')
-rw-r--r-- | src/saml2/pack.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/saml2/pack.py b/src/saml2/pack.py index 7c6b957f..005b2a95 100644 --- a/src/saml2/pack.py +++ b/src/saml2/pack.py @@ -175,6 +175,8 @@ def make_soap_enveloped_saml_thingy(thingy, header_parts=None): _child.tag = '{%s}FuddleMuddle' % DUMMY_NAMESPACE body.append(_child) _str = ElementTree.tostring(envelope, encoding="UTF-8") + if isinstance(_str, six.binary_type): + _str = _str.decode('utf-8') logger.debug("SOAP precursor: %s" % _str) # find an remove the namespace definition i = _str.find(DUMMY_NAMESPACE) |