Skip to content

Commit 28d5454

Browse files
authored
Merge pull request #2421 from minrk/allow-root-after-super
check allow_root after calling super
2 parents 691f101 + b74003b commit 28d5454

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

notebook/notebookapp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1388,6 +1388,8 @@ def start(self):
13881388
This method takes no arguments so all configuration and initialization
13891389
must be done prior to calling this method."""
13901390

1391+
super(NotebookApp, self).start()
1392+
13911393
if not self.allow_root:
13921394
# check if we are running as root, and abort if it's not allowed
13931395
try:
@@ -1398,8 +1400,6 @@ def start(self):
13981400
self.log.critical("Running as root is not recommended. Use --allow-root to bypass.")
13991401
self.exit(1)
14001402

1401-
super(NotebookApp, self).start()
1402-
14031403
info = self.log.info
14041404
for line in self.notebook_info().split("\n"):
14051405
info(line)

0 commit comments

Comments
 (0)