mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Only force saltenv/pillarenv to be a string when not None
This fixes a regression introduced to make numeric saltenv/pillarenv work properly.
This commit is contained in:
parent
81695a9f3c
commit
17f347123a
@ -264,14 +264,14 @@ def _get_opts(**kwargs):
|
||||
|
||||
if 'saltenv' in kwargs:
|
||||
saltenv = kwargs['saltenv']
|
||||
if not isinstance(saltenv, six.string_types):
|
||||
if saltenv is not None and not isinstance(saltenv, six.string_types):
|
||||
opts['environment'] = str(kwargs['saltenv'])
|
||||
else:
|
||||
opts['environment'] = kwargs['saltenv']
|
||||
|
||||
if 'pillarenv' in kwargs:
|
||||
pillarenv = kwargs['pillarenv']
|
||||
if not isinstance(pillarenv, six.string_types):
|
||||
if pillarenv is not None and not isinstance(pillarenv, six.string_types):
|
||||
opts['pillarenv'] = str(kwargs['pillarenv'])
|
||||
else:
|
||||
opts['pillarenv'] = kwargs['pillarenv']
|
||||
|
Loading…
Reference in New Issue
Block a user