]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
Don't catch non-Python 2.7 exceptions
authorStephen Finucane <stephen@that.guru>
Wed, 1 Mar 2017 22:22:59 +0000 (22:22 +0000)
committerStephen Finucane <stephen@that.guru>
Wed, 1 Mar 2017 22:22:59 +0000 (22:22 +0000)
The 'FileNotFoundError' exception is only available in Python 3.3+.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Fixes: 7b07b71e ("templates: Add Patchwork version")
patchwork/version.py

index 212d8d3d875f1a709e8f6915a00e8a7a60522822..7e3fa2e8a50a49043e9e0d28a8dc44b15b3f5220 100644 (file)
@@ -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')