Fix incorrect type coercion

This commit is contained in:
Erik Johnson 2017-12-19 00:34:51 -06:00
parent 0b81631022
commit d265b671b9
No known key found for this signature in database
GPG Key ID: 5E5583C437808F3F

View File

@ -1524,7 +1524,7 @@ def comment_line(path,
else:
# Write the existing line (no change)
wline = line
w_file.write(salt.utils.stringutils.to_str(wline))
w_file.write(salt.utils.stringutils.to_bytes(wline))
except (OSError, IOError) as exc:
raise CommandExecutionError(
"Unable to write file '{0}'. Contents may "