Fixing issue # 40167 with file.replace where the diff output does not

display correctly.
This commit is contained in:
Anas Abognah 2017-04-11 10:26:12 -04:00
parent b0a2414d68
commit 28f7744cb6

View file

@ -2231,8 +2231,8 @@ def replace(path,
check_perms(path, None, pre_user, pre_group, pre_mode)
if show_changes:
orig_file_as_str = ''.join([salt.utils.to_str(x) for x in orig_file])
new_file_as_str = ''.join([salt.utils.to_str(x) for x in new_file])
orig_file_as_str = [salt.utils.to_str(x) for x in orig_file]
new_file_as_str = [salt.utils.to_str(x) for x in new_file]
return ''.join(difflib.unified_diff(orig_file_as_str, new_file_as_str))
return has_changes