From 8d55d47e7d3816c85d1081c2c7d269201b2d4c96 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 17 Nov 2017 10:43:32 -0500 Subject: [PATCH] Fix #1085 for Python 2 This is needed to get pipenv to work on Python 2 hosts (current version on PyPI is broken). Adds the base class of `FileNotFoundError` and adds the default argument of `None` to the `utime` call. --- pipenv/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipenv/utils.py b/pipenv/utils.py index ca2e03e1..e1f8de2e 100644 --- a/pipenv/utils.py +++ b/pipenv/utils.py @@ -1060,7 +1060,7 @@ def touch_update_stamp(): mkdir_p(PIPENV_CACHE_DIR) p = os.sep.join((PIPENV_CACHE_DIR, '.pipenv_update_check')) try: - os.utime(p) - except FileNotFoundError: + os.utime(p, None) + except OSError: with open(p, 'w') as fh: fh.write('')