Skip to content

Commit

Permalink
Print URL of failed request.
Browse files Browse the repository at this point in the history
  • Loading branch information
mboldt committed Oct 19, 2016
1 parent 961dbaf commit 00634fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tile_generator/opsmgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def delete(url, check=True):

def check_response(response, check=True):
if check and response.status_code != requests.codes.ok:
print('-', response.status_code, file=sys.stderr)
print('-', response.status_code, response.request.url, file=sys.stderr)
try:
errors = response.json()["errors"]
print('- '+('\n- '.join(json.dumps(errors, indent=4).splitlines())), file=sys.stderr)
Expand Down

0 comments on commit 00634fc

Please sign in to comment.