Fix exception handling in manage.py (#2912)

This commit is contained in:
Cohee 2023-09-04 13:54:30 +03:00 committed by GitHub
parent 40b527345f
commit b3b1555d82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -325,7 +325,7 @@ class ModelManager(object):
elif "hf_url" in model_item:
self._download_hf_model(model_item, output_path)
except requests.Exception.RequestException as e:
except requests.RequestException as e:
print(f" > Failed to download the model file to {output_path}")
rmtree(output_path)
raise e