Only add the git hash to the version if it's not empty

This commit is contained in:
Christian Dywan 2009-02-23 01:03:59 +01:00
parent e3485dfbfb
commit d8bcecc99d

View file

@ -29,7 +29,8 @@ VERSION = str (major) + '.' + str (minor) + '.' + str (micro)
try:
git = Utils.cmd_output (['git', 'rev-parse', '--short', 'HEAD'], silent=True)
VERSION = (VERSION + '-' + git).strip ()
if git:
VERSION = (VERSION + '-' + git).strip ()
except:
pass