in case of newline at the end of userlist file
It's a habit for some developers to append a newline at the end of the file, but line 82 did not take this into consideration. And the consequence is that JupyterHub would keep restarting.
This commit is contained in:
parent
1baac27d90
commit
5fc9d78a1f
@ -78,6 +78,8 @@ with open(os.path.join(pwd, 'userlist')) as f:
|
||||
if not line:
|
||||
continue
|
||||
parts = line.split()
|
||||
# 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':
|
||||
|
Loading…
Reference in New Issue
Block a user