From e1d3242b2a695e53f3384a46864b72f8d4bc5a3f Mon Sep 17 00:00:00 2001 From: Roland Hedberg Date: Fri, 20 Dec 2013 11:42:19 +0100 Subject: [PATCH] Best effort. --- src/saml2/s_utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/saml2/s_utils.py b/src/saml2/s_utils.py index b5f12cb..0343467 100644 --- a/src/saml2/s_utils.py +++ b/src/saml2/s_utils.py @@ -219,7 +219,10 @@ def error_status_factory(info): exc_val = EXCEPTION2STATUS[info.__class__] except KeyError: exc_val = samlp.STATUS_AUTHN_FAILED - msg = info.args[0] + try: + msg = info.args[0] + except IndexError: + msg = "%s" % info status = samlp.Status( status_message=samlp.StatusMessage(text=msg), status_code=samlp.StatusCode(