diff options
author | Johan Lundberg <lundberg@sunet.se> | 2018-10-18 18:08:09 +0200 |
---|---|---|
committer | Johan Lundberg <lundberg@sunet.se> | 2018-10-19 09:56:34 +0200 |
commit | b62528b7b10747547f393af49afbb2743e916e1a (patch) | |
tree | 36922e9207514a775791c02f3c4b457d410f3ca8 /src/saml2/response.py | |
parent | 691e981b0ddca9b7d75fa468ef31f494e80c0268 (diff) | |
download | pysaml2-b62528b7b10747547f393af49afbb2743e916e1a.tar.gz |
Really handle non ascii in response class __str__
Diffstat (limited to 'src/saml2/response.py')
-rw-r--r-- | src/saml2/response.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/saml2/response.py b/src/saml2/response.py index a8024fef..e1e3edf5 100644 --- a/src/saml2/response.py +++ b/src/saml2/response.py @@ -1082,9 +1082,10 @@ class AuthnResponse(StatusResponse): "session_index": authn_statement.session_index} def __str__(self): - if isinstance(self.xmlstr, six.string_types): - return self.xmlstr - return str(self.xmlstr) + if six.PY2: + return self.xmlstr.decode('utf-8') + else: + return str(self.xmlstr) def verify_recipient(self, recipient): """ |