Merge pull request #35456 from rallytime/merge-2016.3

[2016.3] Merge forward from 2015.8 to 2016.3
This commit is contained in:
Nicole Thomas 2016-08-15 13:16:22 -06:00 committed by GitHub
commit 9b2c075611
3 changed files with 6 additions and 5 deletions

View File

@ -543,7 +543,8 @@ Reload
------
``reload_modules`` is a boolean option that forces salt to reload its modules
after a state finishes. See :ref:`Reloading Modules <reloading-modules>`.
after a state finishes. ``reload_pillar`` and ``reload_grains`` can also be set.
See :ref:`Reloading Modules <reloading-modules>`.
Unless
------

View File

@ -855,6 +855,8 @@ def push_dir(path, glob=None, upload_path=None):
filelist += [os.path.join(root, tmpfile) for tmpfile in files]
if glob is not None:
filelist = [fi for fi in filelist if fnmatch.fnmatch(os.path.basename(fi), glob)]
if not filelist:
return False
for tmpfile in filelist:
if upload_path and tmpfile.startswith(path):
tmpupload_path = os.path.join(os.path.sep,

View File

@ -3599,8 +3599,7 @@ def append(name,
text = _validate_str_list(text)
with salt.utils.fopen(name, 'rb') as fp_:
slines = fp_.readlines()
slines = [item.rstrip() for item in slines]
slines = fp_.read().splitlines()
append_lines = []
try:
@ -3648,8 +3647,7 @@ def append(name,
ret['comment'] = 'File {0} is in correct state'.format(name)
with salt.utils.fopen(name, 'rb') as fp_:
nlines = fp_.readlines()
nlines = [item.rstrip(os.linesep) for item in nlines]
nlines = fp_.read().splitlines()
if slines != nlines:
if not salt.utils.istextfile(name):