Skip to content

Commit 803f28d

Browse files
committed
avoid duplicate 'HTTP error' in error message when HTTPError is raised from github_api_get_request
1 parent 0b91c33 commit 803f28d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

easybuild/tools/github.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ def pr_request_fn(gh):
566566
else:
567567
error_msg = f"HTTP status code: {status}"
568568
except HTTPError as err:
569-
error_msg = f"HTTP error: {err}"
569+
error_msg = str(err)
570570

571571
if error_msg:
572572
error_msg = f"Failed to download diff for {github_account}/{github_repo} PR #{pr}! ({error_msg})"
@@ -735,7 +735,7 @@ def commit_request_fn(gh):
735735
else:
736736
error_msg = f"HTTP status code: {status}"
737737
except HTTPError as err:
738-
error_msg = f"HTTP error: {err}"
738+
error_msg = str(err)
739739

740740
if error_msg:
741741
error_msg = f"Failed to download diff for {github_account}/{github_repo} commit {commit}! ({error_msg})"

0 commit comments

Comments
 (0)