summaryrefslogtreecommitdiff
path: root/src/saml2/saml.py
diff options
context:
space:
mode:
authorClint Byrum <clint@fewbar.com>2015-05-26 14:40:33 -0700
committerClint Byrum <clint@fewbar.com>2015-05-28 09:50:57 -0700
commit23a388788a749f82e3123025130845c4d54d6213 (patch)
tree663f7d89f501e4e29c3942334cdd29b9cfb0908f /src/saml2/saml.py
parent1dc8b80cad4ea88b21c53ad59dd3e1cee3eee7ea (diff)
downloadpysaml2-23a388788a749f82e3123025130845c4d54d6213.tar.gz
Correct python3-incompatible assumptions
The s_utils tests reveal some incompatibilities with python2-specific behaviors being assumed.
Diffstat (limited to 'src/saml2/saml.py')
-rw-r--r--src/saml2/saml.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/saml2/saml.py b/src/saml2/saml.py
index d1513835..f1bc373e 100644
--- a/src/saml2/saml.py
+++ b/src/saml2/saml.py
@@ -193,6 +193,8 @@ class AttributeValueBase(SamlBase):
val = base64.encodestring(val)
self.set_type("xs:base64Binary")
else:
+ if isinstance(val, six.binary_type):
+ val = val.decode('utf-8')
if isinstance(val, six.string_types):
if not typ:
self.set_type("xs:string")