Skip to content

Commit

Permalink
Merge pull request #451 from HubSpot/logfetch_404
Browse files Browse the repository at this point in the history
handle invalid status code from singularity
  • Loading branch information
ssalinas committed Feb 23, 2015
2 parents 8ffbc5d + 80ef15b commit d3bd662
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions scripts/logfetch/singularity_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
def get_json_response(uri, params={}):
singularity_response = requests.get(uri, params=params)
if singularity_response.status_code < 199 or singularity_response.status_code > 299:
sys.stderr.write(uri + '\n')
sys.stderr.write(str(params) + '\n')
sys.stderr.write('{0} params:{1}\n'.format(uri, str(params)))
sys.stderr.write(colored(ERROR_STATUS_FORMAT.format(singularity_response.status_code), 'red') + '\n')
return {}
return singularity_response.json()

2 changes: 1 addition & 1 deletion scripts/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name='singularity-logfetch',
version='0.10.0',
version='0.11.0',
description='Singularity log fetching and searching',
author="HubSpot",
author_email='[email protected]',
Expand Down

0 comments on commit d3bd662

Please sign in to comment.