Merge branch '2015.8' into '2016.3'

No conflicts.
This commit is contained in:
rallytime 2016-10-14 11:01:09 -06:00
commit a7c9a72104
2 changed files with 9 additions and 5 deletions

View file

@ -341,6 +341,8 @@ def get_file_str(path, saltenv='base', env=None):
'''
Return the contents of a file from a URL
Returns ``False`` if Salt was unable to cache a file from a URL.
CLI Example:
.. code-block:: bash
@ -357,9 +359,11 @@ def get_file_str(path, saltenv='base', env=None):
saltenv = env
fn_ = cache_file(path, saltenv)
with salt.utils.fopen(fn_, 'r') as fp_:
data = fp_.read()
return data
if isinstance(fn_, six.string_types):
with salt.utils.fopen(fn_, 'r') as fp_:
data = fp_.read()
return data
return fn_
def cache_file(path, saltenv='base', env=None):

View file

@ -800,8 +800,8 @@ class Pillar(object):
self.rend = salt.loader.render(self.opts, self.functions)
matches = self.top_matches(top)
pillar, errors = self.render_pillar(matches, errors=errors)
pillar = merge(pillar,
self.opts['pillar'],
pillar = merge(self.opts['pillar'],
pillar,
self.merge_strategy,
self.opts.get('renderer', 'yaml'),
self.opts.get('pillar_merge_lists', False))