Use syntax that works on both py2.7 and py3

This commit is contained in:
Mark Haines 2016-03-07 20:13:10 +00:00
parent 80916e6884
commit 239badea9b
8 changed files with 10 additions and 10 deletions

View file

@ -252,7 +252,7 @@ class SAML2RestServlet(ClientV1RestServlet):
SP = Saml2Client(conf)
saml2_auth = SP.parse_authn_request_response(
request.args['SAMLResponse'][0], BINDING_HTTP_POST)
except Exception, e: # Not authenticated
except Exception as e: # Not authenticated
logger.exception(e)
if saml2_auth and saml2_auth.status_ok() and not saml2_auth.not_signed:
username = saml2_auth.name_id.text