Merge pull request #2421 from minrk/allow-root-after-super

check allow_root after calling super
Thomas Kluyver 9 years ago committed by GitHub
commit 28d5454d37

@ -1388,6 +1388,8 @@ class NotebookApp(JupyterApp):
This method takes no arguments so all configuration and initialization
must be done prior to calling this method."""
super(NotebookApp, self).start()
if not self.allow_root:
# check if we are running as root, and abort if it's not allowed
try:
@ -1398,8 +1400,6 @@ class NotebookApp(JupyterApp):
self.log.critical("Running as root is not recommended. Use --allow-root to bypass.")
self.exit(1)
super(NotebookApp, self).start()
info = self.log.info
for line in self.notebook_info().split("\n"):
info(line)

Loading…
Cancel
Save