Ensure that download command exits properly (resolves
@@ -31,7 +31,10 @@ def download(cmd, model, direct=False):
version = get_version(model_name, compatibility)
dl = download_model('{m}-{v}/{m}-{v}.tar.gz'.format(m=model_name,
v=version))
- if dl == 0:
+ if dl != 0:
+ # if download subprocess doesn't return 0, exit with the respective
+ # exit code before doing anything else
+ sys.exit(dl)
try:
# Get package path here because link uses
# pip.get_installed_distributions() to check if model is a
