check if VALUE is a string_type

key should always be a stringtype, we want to exclude booleans in the value.
This commit is contained in:
Daniel Wallace 2017-12-13 09:44:36 -07:00
parent 1032ca3290
commit a5d8a6340e
No known key found for this signature in database
GPG Key ID: 5FA5E5544F010D48

View File

@ -273,7 +273,7 @@ def _get_extra_options(**kwargs):
ret = []
kwargs = salt.utils.clean_kwargs(**kwargs)
for key, value in six.iteritems(kwargs):
if isinstance(key, six.string_types):
if isinstance(value, six.string_types):
ret.append('--{0}=\'{1}\''.format(key, value))
elif value is True:
ret.append('--{0}'.format(key))