Merge pull request #23509 from keesbos/Catch_empty_environment

Catch the unset (empty/None) environment case
This commit is contained in:
Thomas S Hatch 2015-05-09 07:24:37 -06:00
commit 2bb09b7ee7

View File

@ -179,9 +179,9 @@ class GitPillar(object):
def map_branch(self, branch, opts=None):
opts = __opts__ if opts is None else opts
if branch == '__env__':
branch = opts.get('environment', 'base')
branch = opts.get('environment') or 'base'
if branch == 'base':
branch = opts.get('gitfs_base', 'master')
branch = opts.get('gitfs_base') or 'master'
return branch
def update(self):