summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMike <c0psrul3@gmail.com>2017-08-19 16:14:58 -0400
committerToshio Kuratomi <a.badger@gmail.com>2017-08-19 13:15:55 -0700
commit75facf5324070b3448416f5c242d5e1a02f3690f (patch)
treeabaab1ddd9fd7f4dd606085ed5e0351619268dea /lib
parentbb4283edc441aaec47ea523106670e58683ccae2 (diff)
downloadansible-75facf5324070b3448416f5c242d5e1a02f3690f.tar.gz
fixed #28183 - user module shadowfile update on SunOS (#28276)
* fixed #28183 - user module shadowfile update on SunOS (cherry picked from commit b5a00d05d3950ca25a87669196b9ca0432ec37fc)
Diffstat (limited to 'lib')
-rw-r--r--lib/ansible/modules/system/user.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ansible/modules/system/user.py b/lib/ansible/modules/system/user.py
index 69a3bb10dd..209342b721 100644
--- a/lib/ansible/modules/system/user.py
+++ b/lib/ansible/modules/system/user.py
@@ -1356,6 +1356,7 @@ class SunOS(User):
try:
lines = []
for line in open(self.SHADOWFILE, 'rb').readlines():
+ line = to_native(line, errors='surrogate_or_strict')
fields = line.strip().split(':')
if not fields[0] == self.name:
lines.append(line)
@@ -1450,6 +1451,7 @@ class SunOS(User):
try:
lines = []
for line in open(self.SHADOWFILE, 'rb').readlines():
+ line = to_native(line, errors='surrogate_or_strict')
fields = line.strip().split(':')
if not fields[0] == self.name:
lines.append(line)