salt.fileserver.Fileserver: Don't try to split a list in _gen_back

This fixes a bug which causes backends passed as a python list to be
converted to a ``str`` (specifically a ``unicode`` type in PY2) and then
split, resulting in a backend that will never match anything.

This only affects runner and Salt Python API usage in which the
"backend" param to fileserver runner funcs is passed as a Python list.
This commit is contained in:
Erik Johnson 2016-09-12 15:43:39 -05:00
parent 4e9490eebe
commit 363b21fd9b

View file

@ -323,10 +323,11 @@ class Fileserver(object):
if not back:
back = self.opts['fileserver_backend']
else:
try:
back = back.split(',')
except AttributeError:
back = six.text_type(back).split(',')
if not isinstance(back, list):
try:
back = back.split(',')
except AttributeError:
back = six.text_type(back).split(',')
ret = []
if not isinstance(back, list):