From 0514b6391cbb9e20d67ca1e0324106f6a9ebca0b Mon Sep 17 00:00:00 2001 From: Lupco Kotev Date: Fri, 21 Jul 2017 14:47:30 +0200 Subject: [PATCH] Force attributes to be text to pass xml encoding --- mama_cas/response.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mama_cas/response.py b/mama_cas/response.py index 456b515..d4d07fe 100644 --- a/mama_cas/response.py +++ b/mama_cas/response.py @@ -233,10 +233,10 @@ def get_attribute_statement(self, subject, attributes): if isinstance(value, list): for v in value: attribute_value = etree.SubElement(attribute, 'AttributeValue') - attribute_value.text = v + attribute_value.text = force_text(v) else: attribute_value = etree.SubElement(attribute, 'AttributeValue') - attribute_value.text = value + attribute_value.text = force_text(value) return attribute_statement def get_authentication_statement(self, subject, ticket):