Skip to content

Commit

Permalink
Updated deprecated python 2 StandardError exception
Browse files Browse the repository at this point in the history
  • Loading branch information
cliveza authored Jan 16, 2018
1 parent 50bcd11 commit bb83b11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aws_google_auth/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,13 @@ def do_login(self):

def parse_saml(self):
if self.session_state is None:
raise StandardError('You must use do_login() before calling parse_saml()')
raise Exception('You must use do_login() before calling parse_saml()')

parsed = BeautifulSoup(self.session_state.text, 'html.parser')
try:
saml_element = parsed.find('input', {'name': 'SAMLResponse'}).get('value')
except:
raise StandardError('Could not find SAML response, check your credentials')
raise Exception('Could not find SAML response, check your credentials')

return saml_element

Expand Down

0 comments on commit bb83b11

Please sign in to comment.