From: Stephen Finucane Date: Wed, 1 Mar 2017 22:22:59 +0000 (+0000) Subject: Don't catch non-Python 2.7 exceptions X-Git-Tag: v2.0.0-rc1~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3e9aee4605411ad3ab672e7dd6b7bdd15836fe3;p=thirdparty%2Fpatchwork.git Don't catch non-Python 2.7 exceptions The 'FileNotFoundError' exception is only available in Python 3.3+. Signed-off-by: Stephen Finucane Fixes: 7b07b71e ("templates: Add Patchwork version") --- diff --git a/patchwork/version.py b/patchwork/version.py index 212d8d3d..7e3fa2e8 100644 --- a/patchwork/version.py +++ b/patchwork/version.py @@ -57,7 +57,7 @@ def get_raw_git_version(): try: git_version = subprocess.check_output(['git', 'describe'], cwd=ROOT_DIR) - except (OSError, FileNotFoundError): + except OSError: return '' return git_version.strip().decode('utf-8')