From 06745ab73e4a05ef579e77d0c835f59412994f0b Mon Sep 17 00:00:00 2001 From: Helder Correia Date: Wed, 22 Nov 2017 17:36:22 -0100 Subject: [PATCH] Fix "connection reset by peer" when grabbing hashes --- pipenv/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipenv/utils.py b/pipenv/utils.py index 919f8241..6cfcdc1d 100644 --- a/pipenv/utils.py +++ b/pipenv/utils.py @@ -36,7 +36,7 @@ from piptools.scripts.compile import get_pip_command from piptools import logging from piptools.exceptions import NoCandidateFound from pip.exceptions import DistributionNotFound -from requests.exceptions import HTTPError +from requests.exceptions import HTTPError, ConnectionError from .pep508checker import lookup from .environments import SESSION_IS_INTERACTIVE, PIPENV_MAX_ROUNDS, PIPENV_CACHE_DIR @@ -591,7 +591,7 @@ def resolve_deps(deps, which, which_pip, project, sources=None, verbose=False, p if not collected_hashes: collected_hashes = list(list(resolver.resolve_hashes([result]).items())[0][1]) - except (ValueError, KeyError): + except (ValueError, KeyError, ConnectionError): if verbose: print('Error fetching {}'.format(name))