Skip to content
Permalink
Browse files

support -b

  • Loading branch information
ralsina committed May 20, 2015
1 parent 30c56a9 commit 8b59271d83fd76a492bda4b4a27c757fbce56d42
Showing with 5 additions and 0 deletions.
  1. +5 −0 nikola/plugins/command/auto/auto.py
@@ -34,6 +34,7 @@
from urlparse import urlparse
except ImportError:
from urllib.parse import urlparse # NOQA
import webbrowser
from wsgiref.simple_server import make_server
import wsgiref.util

@@ -175,6 +176,10 @@ def __call__(self, environ, start_response):
ws.initialize_websockets_manager()
print("Serving on port {0}...".format(port))

# Yes, this is racy
if browser:
webbrowser.open('http://{0}:{1}'.format(host, port))

try:
ws.serve_forever()
except KeyboardInterrupt:

0 comments on commit 8b59271

Please sign in to comment.