Take into account __env__ and saltenv being passed from state files.

This commit is contained in:
Pedro Algarvio 2013-11-06 23:10:42 +00:00
parent 6e76123a0f
commit f19ad9bd9d

View File

@ -1275,9 +1275,11 @@ class State(object):
# format_call # format_call
env = cdata['kwargs']['env'] env = cdata['kwargs']['env']
elif '__env__' in data: elif '__env__' in data:
# The user is passing an alternative environement using the # The user is passing an alternative environment using __env__
# proper keyword argument # which is also not the appropriate choice, still, handle it
env = data['__env__'] env = data['__env__']
elif 'saltenv' in data:
env = data['saltenv']
else: else:
# Let's use the default environment # Let's use the default environment
env = 'base' env = 'base'