Merge pull request #454 from adamhadani/download-noerrorifexists

Exit code 0 for when downloading a model that already was downloaded
This commit is contained in:
Matthew Honnibal 2016-07-14 09:52:57 +10:00 committed by GitHub
commit d9fcf9b79e

View File

@ -17,7 +17,7 @@ def download(lang, force=False):
sputnik.package(about.__title__, about.__version__, about.__models__[lang]) sputnik.package(about.__title__, about.__version__, about.__models__[lang])
print("Model already installed. Please run 'python -m " print("Model already installed. Please run 'python -m "
"spacy.%s.download --force' to reinstall." % lang, file=sys.stderr) "spacy.%s.download --force' to reinstall." % lang, file=sys.stderr)
sys.exit(1) sys.exit(0)
except (PackageNotFoundException, CompatiblePackageNotFoundException): except (PackageNotFoundException, CompatiblePackageNotFoundException):
pass pass