put in more proper logic for int conversion when reading from the PIPENV_TIMEOUT variable

This commit is contained in:
Erin O'Connell
2017-06-10 01:58:54 -06:00
parent 1818dc6afa
commit 9c2982b03b
+3 -1
View File
@@ -36,5 +36,7 @@ if PIPENV_VENV_IN_PROJECT:
if os.name == 'nt':
PIPENV_NOSPIN = True
_pipenv_timout_raw = os.environ.get('PIPENV_TIMEOUT')
# Tells pipenv how long to wait for virtualenvs to be created in seconds
PIPENV_TIMEOUT = int(os.environ.get('PIPENV_TIMEOUT')) or 120
PIPENV_TIMEOUT = int(_pipenv_timout_raw) if _pipenv_timout_raw is not None else 120