mirror of https://github.com/explosion/spaCy.git
Ensure that download command exits properly (resolves #1714)
This commit is contained in:
parent
1081e08efb
commit
dacfaa2ca4
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue