diff --git a/src/saml2/entity.py b/src/saml2/entity.py index 171a1a1..6c2adf1 100644 --- a/src/saml2/entity.py +++ b/src/saml2/entity.py @@ -339,7 +339,7 @@ class Entity(HTTPBase): mid = msg.id try: - to_sign.append([(class_name(msg), mid)]) + to_sign += [(class_name(msg), mid)] except AttributeError: to_sign = [(class_name(msg), mid)] @@ -451,7 +451,7 @@ class Entity(HTTPBase): self._add_info(response, **kwargs) if sign: - self.sign(response, to_sign=to_sign) + return self.sign(response, to_sign=to_sign) elif to_sign: return signed_instance_factory(response, self.sec, to_sign) else: