Skip to content

Commit e96a183

Browse files
committed
Correct *nix passwd entry handling
1 parent 8a83d2e commit e96a183

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

slip39/gui/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -673,11 +673,11 @@ def user_name_full():
673673
# eg.: "Full Name IEUser"
674674
full_name = li[9:].strip()
675675
break
676-
elif li:
676+
else:
677677
# getent="perry:x:1002:1004:Perry Kundert,,,:/home/perry:/bin/bash"
678678
# >>> getent.split(':')
679679
# ['perry', 'x', '1002', '1004', 'Perry Kundert,,,', '/home/perry', '/bin/bash']
680-
pwents = li.split( ':' )
680+
pwents = subproc.stdout.split( ':' )
681681
assert len( pwents ) > 4, \
682682
f"Unrecognized passwd entry: {li}"
683683
gecos = pwents[4]

0 commit comments

Comments
 (0)