Avoid crash if running command results in None output.

This commit is contained in:
Tomas Groth 2019-09-24 18:40:34 +00:00
parent 6c7d10fd8d
commit c91d620362
1 changed files with 1 additions and 2 deletions

View File

@ -318,8 +318,7 @@ class Builder(object):
else:
# This is a development build, get the version info based on tags
git_version = self._git('describe', self.branch_path, ['--tags'], err_msg='Error running git describe')
git_version = git_version.strip()
if not git_version:
if not git_version or len(git_version.strip()) == 0:
self.version = '0.0.0'
else:
self.version = '+'.join(git_version.strip().rsplit('-g', 1))