mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-13 11:56:30 +00:00
[Packaging] Fix get_version with no git command
An unhandled FileNotFoundError was encounted if git command was not available.
This commit is contained in:
parent
aa35247e95
commit
0c87d9bd7d
@ -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, '')
|
||||
|
Loading…
x
Reference in New Issue
Block a user