mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
make wline a bytestring if py2 and windows
This commit is contained in:
parent
29788617f1
commit
6b1b77f9ef
@ -1525,7 +1525,7 @@ def comment_line(path,
|
||||
# Write the existing line (no change)
|
||||
wline = line
|
||||
wline = salt.utils.stringutils.to_bytes(wline) \
|
||||
if salt.utils.platform.is_windows() \
|
||||
if six.PY2 and salt.utils.platform.is_windows() \
|
||||
else salt.utils.stringutils.to_str(wline)
|
||||
w_file.write(wline)
|
||||
except (OSError, IOError) as exc:
|
||||
|
Loading…
Reference in New Issue
Block a user