Also check if pillarenv is in opts

This will future-proof this code against a problem similar to the one
fixed by https://github.com/saltstack/salt/pull/37721
This commit is contained in:
Erik Johnson 2016-12-14 12:13:07 -06:00
parent 004e46afe7
commit fa9ad311c6

View File

@ -351,7 +351,7 @@ class Pillar(object):
if not opts.get('environment'):
opts['environment'] = saltenv
opts['id'] = self.minion_id
if 'pillarenv' not in opts:
if not opts.get('pillarenv'):
opts['pillarenv'] = pillarenv
if opts['state_top'].startswith('salt://'):
opts['state_top'] = opts['state_top']