FIX:(#1068) When running from source, would fail with a GIT_BRANCH not defined error message on startup

This commit is contained in:
evilhero 2015-06-22 09:01:17 -04:00
parent 0c6bd57606
commit 6ebf7b2057
1 changed files with 7 additions and 1 deletions

View File

@ -128,8 +128,14 @@ def getVersion():
current_version = f.read().strip(' \n\r')
if current_version:
return current_version, GIT_BRANCH
if mylar.GIT_BRANCH:
logger.info('Branch detected & set to : ' + mylar.GIT_BRANCH)
return current_version, mylar.GIT_BRANCH
else:
logger.warn('No branch specified within config - manually specify, but will default to Master branch.')
return current_version, 'master'
else:
logger.warn('Unable to determine which commit is currently being run. Defaulting to Master branch.')
return None, 'master'
def checkGithub():