Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Commit

Permalink
Correct error path on RequestException
Browse files Browse the repository at this point in the history
The length of the args array when a RequestException occurs is not
known. Just turn the exception into a string.

Signed-off-by: Tim Smith <[email protected]>
  • Loading branch information
TimSmithCtx authored and Simon Rowe committed Dec 12, 2018
1 parent 0475d52 commit 634df1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion planex/cmd/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def fetch_url(url, source, retries):
except requests.RequestException as exn:
# Download failed
sys.exit("%s: Failed to fetch %s: %s" %
(sys.argv[0], urlunparse(url), exn.args[1]))
(sys.argv[0], urlunparse(url), str(exn)))

except IOError as exn:
# IO error saving source file
Expand Down

0 comments on commit 634df1d

Please sign in to comment.