Skip to content

Commit

Permalink
Be sure to return unicode
Browse files Browse the repository at this point in the history
  • Loading branch information
s0undt3ch committed Nov 29, 2019
1 parent fb3dc69 commit 87693b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion salt/modules/cp.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ def get_file_str(path, saltenv='base'):
if isinstance(fn_, six.string_types):
try:
with salt.utils.files.fopen(fn_, 'r') as fp_:
return fp_.read()
return salt.utils.stringutils.to_unicode(fp_.read())
except IOError:
return False
return fn_
Expand Down

0 comments on commit 87693b6

Please sign in to comment.