diff options
author | Clint Byrum <clint@fewbar.com> | 2015-05-15 10:52:33 -0700 |
---|---|---|
committer | Clint Byrum <clint@fewbar.com> | 2015-05-15 11:52:15 -0700 |
commit | 99911f6c4c7d51071f70709e55fabcd2e6853284 (patch) | |
tree | 9ae82d0d6c11e05bd9bd152c94993d21f744b252 /src/saml2/s2repoze | |
parent | 4ef44631df5426e0b4808b1c79b51a37eb026a76 (diff) | |
download | pysaml2-99911f6c4c7d51071f70709e55fabcd2e6853284.tar.gz |
Fix python3 syntax errors
Retains python2.7 compatibility for all files. Fixes only syntax errors,
tests still fail on python3 for various reasons.
Diffstat (limited to 'src/saml2/s2repoze')
-rw-r--r-- | src/saml2/s2repoze/plugins/sp.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/saml2/s2repoze/plugins/sp.py b/src/saml2/s2repoze/plugins/sp.py index 41c7c3d9..bd05a06a 100644 --- a/src/saml2/s2repoze/plugins/sp.py +++ b/src/saml2/s2repoze/plugins/sp.py @@ -356,7 +356,7 @@ class SAML2Plugin(object): relay_state=came_from) logger.debug("ht_args: %s" % ht_args) - except Exception, exc: + except Exception as exc: logger.exception(exc) raise Exception( "Failed to construct the AuthnRequest: %s" % exc) @@ -403,12 +403,12 @@ class SAML2Plugin(object): post["SAMLResponse"][0], binding, self.outstanding_queries, self.outstanding_certs) - except Exception, excp: + except Exception as excp: logger.exception("Exception: %s" % (excp,)) raise session_info = authresp.session_info() - except TypeError, excp: + except TypeError as excp: logger.exception("Exception: %s" % (excp,)) return None @@ -526,17 +526,17 @@ class SAML2Plugin(object): session_info = self._eval_authn_response( environ, post, binding=binding) - except Exception, err: + except Exception as err: environ["s2repoze.saml_error"] = err return {} - except TypeError, exc: + except TypeError as exc: # might be a ECP (=SOAP) response body = environ.get('s2repoze.body', None) if body: # might be a ECP response try: session_info = self.do_ecp_response(body, environ) - except Exception, err: + except Exception as err: environ["post.fieldstorage"] = post environ["s2repoze.saml_error"] = err return {} |