From f6f7ee06a6b1a96746a391556833951af4c9af73 Mon Sep 17 00:00:00 2001 From: AMZN-Phil Date: Fri, 28 Jan 2022 10:10:17 -0800 Subject: [PATCH] Catch URLError so a message can be printed. Signed-off-by: AMZN-Phil --- scripts/o3de/o3de/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/o3de/o3de/utils.py b/scripts/o3de/o3de/utils.py index 6628e6c946..5a3c807dd1 100644 --- a/scripts/o3de/o3de/utils.py +++ b/scripts/o3de/o3de/utils.py @@ -203,6 +203,9 @@ def download_file(parsed_uri, download_path: pathlib.Path, force_overwrite: bool except urllib.error.HTTPError as e: logger.error(f'HTTP Error {e.code} opening {parsed_uri.geturl()}') return 1 + except urllib.error.URLError as e: + logger.error(f'URL Error {e.reason} opening {parsed_uri.geturl()}') + return 1 else: origin_file = pathlib.Path(parsed_uri.geturl()).resolve() if not origin_file.is_file():