Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix starting notebook server with file/directory at command line. #5464

Merged
merged 1 commit into from Mar 28, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions IPython/html/notebookapp.py
Expand Up @@ -73,6 +73,7 @@

from .base.handlers import AuthenticatedFileHandler, FileFindHandler

from IPython.config import Config
from IPython.config.application import catch_config_error, boolean_flag
from IPython.core.application import BaseIPythonApplication
from IPython.core.profiledir import ProfileDir
Expand Down Expand Up @@ -554,10 +555,12 @@ def parse_command_line(self, argv=None):

# Use config here, to ensure that it takes higher priority than
# anything that comes from the profile.
c = Config()
if os.path.isdir(f):
self.config.NotebookApp.notebook_dir = f
c.NotebookApp.notebook_dir = f
elif os.path.isfile(f):
self.config.NotebookApp.file_to_run = f
c.NotebookApp.file_to_run = f
self.update_config(c)

def init_kernel_argv(self):
"""construct the kernel arguments"""
Expand Down