resources: Output error message in downloader.py
This allows for the actual error message to be output in addition to the output gem5 has on ValueErrors and ImportErrors. Change-Id: Ic52f5646aa41dbf7c217ab27d142c0a18fa24c55 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71859 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com>
This commit is contained in:
@@ -157,12 +157,14 @@ def _download(url: str, download_to: str, max_attempts: int = 6) -> None:
|
||||
raise e
|
||||
except ValueError as e:
|
||||
raise Exception(
|
||||
f"ValueError: {e}\n"
|
||||
"Environment variable GEM5_USE_PROXY is set to "
|
||||
f"'{use_proxy}'. The expected form is "
|
||||
"<host>:<port>'."
|
||||
)
|
||||
except ImportError as e:
|
||||
raise Exception(
|
||||
f"ImportError: {e}\n"
|
||||
"An import error has occurred. This is likely due "
|
||||
"the Python SOCKS client module not being "
|
||||
"installed. It can be installed with "
|
||||
|
||||
Reference in New Issue
Block a user