Skip to content

Commit

Permalink
Merge pull request #243 from jtpio/open-browser-listen
Browse files Browse the repository at this point in the history
Launch browser after listening
  • Loading branch information
maartenbreddels authored Jun 14, 2019
2 parents 7164dc5 + b4819e0 commit 859376d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions voila/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,6 @@ def start(self):
])

self.app.add_handlers('.*$', handlers)
if self.open_browser:
self.launch_browser()
self.listen()

def stop(self):
Expand All @@ -463,6 +461,9 @@ def listen(self):
self.app.listen(self.port)
self.log.info('Voila is running at:\n%s' % self.display_url)

if self.open_browser:
self.launch_browser()

self.ioloop = tornado.ioloop.IOLoop.current()
try:
self.ioloop.start()
Expand Down

0 comments on commit 859376d

Please sign in to comment.