mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
* fixed #28183 - user module shadowfile update on SunOS
This commit is contained in:
parent
76bcce7e72
commit
b5a00d05d3
1 changed files with 2 additions and 0 deletions
|
@ -1348,6 +1348,7 @@ class SunOS(User):
|
||||||
try:
|
try:
|
||||||
lines = []
|
lines = []
|
||||||
for line in open(self.SHADOWFILE, 'rb').readlines():
|
for line in open(self.SHADOWFILE, 'rb').readlines():
|
||||||
|
line = to_native(line, errors='surrogate_or_strict')
|
||||||
fields = line.strip().split(':')
|
fields = line.strip().split(':')
|
||||||
if not fields[0] == self.name:
|
if not fields[0] == self.name:
|
||||||
lines.append(line)
|
lines.append(line)
|
||||||
|
@ -1442,6 +1443,7 @@ class SunOS(User):
|
||||||
try:
|
try:
|
||||||
lines = []
|
lines = []
|
||||||
for line in open(self.SHADOWFILE, 'rb').readlines():
|
for line in open(self.SHADOWFILE, 'rb').readlines():
|
||||||
|
line = to_native(line, errors='surrogate_or_strict')
|
||||||
fields = line.strip().split(':')
|
fields = line.strip().split(':')
|
||||||
if not fields[0] == self.name:
|
if not fields[0] == self.name:
|
||||||
lines.append(line)
|
lines.append(line)
|
||||||
|
|
Loading…
Reference in a new issue