add nicer message when remote requirements doesn't exist

This commit is contained in:
Nate Prewitt
2017-10-22 16:08:46 -07:00
parent 2a83670abc
commit d2a1d40727
+10 -1
View File
@@ -1754,7 +1754,16 @@ def install(
if remote:
# Download requirements file
click.echo(crayons.normal(u'Remote requirements file provided! Downloading…',bold=True),err=True)
download_file(requirements, temporary_requirements)
try:
download_file(requirements, temporary_requirements)
except IOError:
click.echo(
crayons.red(
u'Unable to find requirements file at {0}.'.format(crayons.normal(requirements))
),
err=True
)
sys.exit(1)
# Replace the url with the temporary requirements file
requirements = temporary_requirements
remote = True