mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-05 16:08:40 +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
1 changed files with 1 additions and 1 deletions
|
@ -45,7 +45,7 @@ def call_git_describe(prefix='', suffix=''):
|
||||||
cmd = 'git describe --tags --match %s[0-9]*' % prefix
|
cmd = 'git describe --tags --match %s[0-9]*' % prefix
|
||||||
try:
|
try:
|
||||||
output = subprocess.check_output(cmd.split(), stderr=subprocess.PIPE)
|
output = subprocess.check_output(cmd.split(), stderr=subprocess.PIPE)
|
||||||
except subprocess.CalledProcessError:
|
except (OSError, subprocess.CalledProcessError):
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
version = output.decode('utf-8').strip().replace(prefix, '')
|
version = output.decode('utf-8').strip().replace(prefix, '')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue