tools/distro-tool: error on 400 series http status codes

Signed-off-by: Ian Leonard <antonlacon@gmail.com>
This commit is contained in:
Ian Leonard 2024-10-19 02:26:50 -04:00
parent 7b57ee7a3c
commit 509961e11d

View File

@ -357,7 +357,7 @@ class MyUtility(object):
while attempts < retries:
if stopped.is_set(): break
attempts += 1
(result, output) = MyUtility.runcommand(msgs, f"curl --silent --show-error --connect-timeout 30 --retry 3 --continue-at - --location --max-redirs 5 --output {filename_data} {url}", logfile=filename_log)
(result, output) = MyUtility.runcommand(msgs, f"curl --silent --show-error --fail --connect-timeout 30 --retry 3 --continue-at - --location --max-redirs 5 --output {filename_data} {url}", logfile=filename_log)
if result == 0:
return True