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,7 +78,9 @@ with open(os.path.join(pwd, 'userlist')) as f:
|
|||||||
if not line:
|
if not line:
|
||||||
continue
|
continue
|
||||||
parts = line.split()
|
parts = line.split()
|
||||||
name = parts[0]
|
# in case of newline at the end of userlist file
|
||||||
whitelist.add(name)
|
if len(parts) >= 1:
|
||||||
if len(parts) > 1 and parts[1] == 'admin':
|
name = parts[0]
|
||||||
admin.add(name)
|
whitelist.add(name)
|
||||||
|
if len(parts) > 1 and parts[1] == 'admin':
|
||||||
|
admin.add(name)
|
||||||
|
Loading…
Reference in New Issue
Block a user