From 328dca54969130397f7a3cf59c0777baecb557f4 Mon Sep 17 00:00:00 2001 From: Kris Wilson Date: Tue, 28 Apr 2020 23:53:20 -0700 Subject: [PATCH] Feedback: file_to_run and sock mutual exclusion. --- notebook/notebookapp.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/notebook/notebookapp.py b/notebook/notebookapp.py index 726ec6491..100dfa1c9 100755 --- a/notebook/notebookapp.py +++ b/notebook/notebookapp.py @@ -1557,6 +1557,12 @@ class NotebookApp(JupyterApp): _('Ignoring --NotebookApp.open_browser due to --sock being used.'), ) + if self.file_to_run: + self.log.critical( + _('Options --NotebookApp.file_to_run and --sock are mutually exclusive.'), + ) + sys.exit(1) + if sys.platform.startswith('win'): self.log.critical( _('Option --sock is not supported on Windows, but got value of %s. Aborting.' % self.sock),