diff options
author | Mark Gregson <mark.gregson@linkdigital.com.au> | 2017-03-09 13:59:32 +1100 |
---|---|---|
committer | Mark Gregson <mark.gregson@linkdigital.com.au> | 2017-03-09 13:59:32 +1100 |
commit | fd0145e27b8daed54001de89aa370d5f26ef2a31 (patch) | |
tree | e257b3bd4d280ebfdb53a88fedd39235eb95c13f | |
parent | a0c510af7aa620a4c500d538bed44995084f389f (diff) | |
download | pysaml2-fd0145e27b8daed54001de89aa370d5f26ef2a31.tar.gz |
Catch UnboundLocalError when session_info is not set
-rw-r--r-- | src/saml2/s2repoze/plugins/sp.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/saml2/s2repoze/plugins/sp.py b/src/saml2/s2repoze/plugins/sp.py index 7ae7b20a..79d562ed 100644 --- a/src/saml2/s2repoze/plugins/sp.py +++ b/src/saml2/s2repoze/plugins/sp.py @@ -549,10 +549,10 @@ class SAML2Plugin(object): environ["post.fieldstorage"] = post return {} - if session_info: + try: environ["s2repoze.sessioninfo"] = session_info return self._construct_identity(session_info) - else: + except UnboundLocalError: return None # IMetadataProvider |