Skip to content

Commit 16a970e

Browse files
authored
Merge pull request jupyterhub#73 from BlueCocoa/patch-1
in case of newline at the end of userlist file
2 parents 1baac27 + 5fc9d78 commit 16a970e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

jupyterhub_config.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@
7878
if not line:
7979
continue
8080
parts = line.split()
81-
name = parts[0]
82-
whitelist.add(name)
83-
if len(parts) > 1 and parts[1] == 'admin':
84-
admin.add(name)
81+
# in case of newline at the end of userlist file
82+
if len(parts) >= 1:
83+
name = parts[0]
84+
whitelist.add(name)
85+
if len(parts) > 1 and parts[1] == 'admin':
86+
admin.add(name)

0 commit comments

Comments
 (0)