Skip to content

Commit f54484f

Browse files
authored
Merge pull request pypa#558 from isudox/master
Output friendly and concise message when updating pipenv failed.
2 parents 4da6a75 + 394d546 commit f54484f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pipenv/cli.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,11 @@ def check_for_updates():
140140

141141
def ensure_latest_self(user=False):
142142
"""Updates Pipenv to latest version, cleverly."""
143-
r = requests.get('https://pypi.python.org/pypi/pipenv/json', timeout=0.5)
143+
try:
144+
r = requests.get('https://pypi.python.org/pypi/pipenv/json', timeout=0.5)
145+
except requests.RequestException as e:
146+
click.echo(crayons.red(e))
147+
sys.exit(1)
144148
latest = sorted([semver.parse_version_info(v) for v in list(r.json()['releases'].keys())])[-1]
145149
current = semver.parse_version_info(__version__)
146150

0 commit comments

Comments
 (0)