Skip to content
This repository has been archived by the owner on Sep 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #139 from vetletm/remove_exit_statements
Browse files Browse the repository at this point in the history
Remove print and exit statements
  • Loading branch information
falkowich authored May 4, 2020
2 parents 22a659d + 73e6b15 commit d2cfec1
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions ise.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,14 @@ def _pass_ersresponse(result, resp):
result['response'] = resp.json()['ERSResponse']['messages'][0]['title']
result['error'] = resp.status_code
return result

except ValueError as e:
except ValueError:
if '<title>HTTP Status 401 – Unauthorized</title>' in resp.text:
result['response'] = 'Unauthorized'
result['error'] = resp.status_code
print('HTTP Status 401 - Unauthorized')
sys.exit(1)
return result
else:
print(e)
sys.exit(1)
result['error'] = resp.status_code
return result

def _get_groups(self, url, filter: str = None, size: int = 20, page: int = 1):
"""
Expand Down

0 comments on commit d2cfec1

Please sign in to comment.