try/except for when __proxy__ is not injected.

This commit is contained in:
C. R. Oldham 2016-09-30 14:13:34 -06:00
parent e8e53d60be
commit 891004f3be

View file

@ -1122,7 +1122,10 @@ def sls_id(
opts['test'] = _get_test_value(test, **kwargs)
if 'pillarenv' in kwargs:
opts['pillarenv'] = kwargs['pillarenv']
st_ = salt.state.HighState(opts, proxy=__proxy__)
try:
st_ = salt.state.HighState(opts, proxy=__proxy__)
except NameError:
st_ = salt.state.HighState(opts)
if isinstance(mods, six.string_types):
split_mods = mods.split(',')
st_.push_active()