From f8310558948dcd86cf12f1ca27db97e616bf85e2 Mon Sep 17 00:00:00 2001 From: Peter Badida Date: Fri, 22 Sep 2017 23:34:26 +0200 Subject: [PATCH] Add IOError type of FileNotFoundError on Windows --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 4e5bd4a86..19adf896b 100644 --- a/setup.py +++ b/setup.py @@ -46,7 +46,11 @@ def get_version(filename='kivy/version.py'): GIT_REVISION = check_output( ['git', 'rev-parse', 'HEAD'] ).strip().decode('ascii') - except (CalledProcessError, OSError): + except (CalledProcessError, OSError, IOError) as e: + # CalledProcessError has no errno + errno = getattr(e, 'errno', None) + if errno != 2 and 'CalledProcessError' not in repr(e): + raise GIT_REVISION = "Unknown" cnt = (