summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2019-06-07 14:43:52 +0100
committerCalum Lind <calumlind+deluge@gmail.com>2019-06-07 14:45:49 +0100
commit0c87d9bd7da0ea2971eff8a3503f68cd1219bb38 (patch)
treed0e31ca951f1113c0b79be5ae9cb431cb204b32e
parentaa35247e95b3f831258b60c7ec89da1e84a98bc6 (diff)
downloaddeluge-0c87d9bd7da0ea2971eff8a3503f68cd1219bb38.tar.gz
deluge-0c87d9bd7da0ea2971eff8a3503f68cd1219bb38.tar.bz2
deluge-0c87d9bd7da0ea2971eff8a3503f68cd1219bb38.zip
[Packaging] Fix get_version with no git command
An unhandled FileNotFoundError was encounted if git command was not available.
-rwxr-xr-xversion.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/version.py b/version.py
index b1e36adc2..ff8f684d5 100755
--- a/version.py
+++ b/version.py
@@ -45,7 +45,7 @@ def call_git_describe(prefix='', suffix=''):
cmd = 'git describe --tags --match %s[0-9]*' % prefix
try:
output = subprocess.check_output(cmd.split(), stderr=subprocess.PIPE)
- except subprocess.CalledProcessError:
+ except (OSError, subprocess.CalledProcessError):
return None
else:
version = output.decode('utf-8').strip().replace(prefix, '')