Show More
@@ -551,10 +551,11 b' class NotebookApp(BaseIPythonApplication):' | |||
|
551 | 551 | |
|
552 | 552 | if self.open_browser or self.file_to_run: |
|
553 | 553 | ip = self.ip or '127.0.0.1' |
|
554 |
|
|
|
555 | browser = webbrowser.get(self.browser) | |
|
556 | else: | |
|
557 | browser = webbrowser.get() | |
|
554 | try: | |
|
555 | browser = webbrowser.get(self.browser or None) | |
|
556 | except webbrowser.Error as e: | |
|
557 | self.log.warn('No web browser found: %s.' % e) | |
|
558 | browser = None | |
|
558 | 559 | |
|
559 | 560 | if self.file_to_run: |
|
560 | 561 | filename, _ = os.path.splitext(os.path.basename(self.file_to_run)) |
@@ -566,10 +567,10 b' class NotebookApp(BaseIPythonApplication):' | |||
|
566 | 567 | url = '' |
|
567 | 568 | else: |
|
568 | 569 | url = '' |
|
569 | b = lambda : browser.open("%s://%s:%i%s%s" % (proto, ip, | |
|
570 | self.port, self.base_project_url, url), | |
|
571 | new=2) | |
|
572 | threading.Thread(target=b).start() | |
|
570 | if browser: | |
|
571 | b = lambda : browser.open("%s://%s:%i%s%s" % (proto, ip, | |
|
572 | self.port, self.base_project_url, url), new=2) | |
|
573 | threading.Thread(target=b).start() | |
|
573 | 574 | try: |
|
574 | 575 | ioloop.IOLoop.instance().start() |
|
575 | 576 | except KeyboardInterrupt: |
General Comments 0
You need to be logged in to leave comments.
Login now