From 690cfb54a17a386dbc85b7f89b10802b7a89d7f3 Mon Sep 17 00:00:00 2001 From: lethosor Date: Mon, 21 Sep 2015 19:02:23 -0400 Subject: [PATCH] pr-check-base: Show more information about HTTP errors --- travis/pr-check-base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/travis/pr-check-base.py b/travis/pr-check-base.py index e31e33bcf..f3cbab18c 100644 --- a/travis/pr-check-base.py +++ b/travis/pr-check-base.py @@ -19,8 +19,8 @@ try: res = json.loads(urlopen('https://api.github.com/repos/%s/pulls/%i' % (repo, pr_id)).read().decode('utf-8')) except ValueError: pass -except HTTPError: - print('Failed to retrieve PR information from API') +except HTTPError as e: + print('Failed to retrieve PR information from API: %s' % e) sys.exit(2) if 'base' not in res or 'ref' not in res['base']: print('Invalid JSON returned from API')