Merge pull request #73 from BlueCocoa/patch-1
in case of newline at the end of userlist file
This commit is contained in:
commit
16a970ec6b
@ -78,7 +78,9 @@ with open(os.path.join(pwd, 'userlist')) as f:
|
||||
if not line:
|
||||
continue
|
||||
parts = line.split()
|
||||
name = parts[0]
|
||||
whitelist.add(name)
|
||||
if len(parts) > 1 and parts[1] == 'admin':
|
||||
admin.add(name)
|
||||
# in case of newline at the end of userlist file
|
||||
if len(parts) >= 1:
|
||||
name = parts[0]
|
||||
whitelist.add(name)
|
||||
if len(parts) > 1 and parts[1] == 'admin':
|
||||
admin.add(name)
|
||||
|
Loading…
Reference in New Issue
Block a user