Start Browser on custom IP, fixed #827

This commit is contained in:
Norman Jäckel 2013-07-25 17:03:04 +02:00
parent 6b90ef6576
commit 2128e787bf

View File

@ -203,11 +203,15 @@ def _main(opts, database_path=None):
reload = False reload = False
if opts.start_browser: if opts.start_browser:
if opts.address:
prefix = opts.address
else:
prefix = 'localhost'
if port == 80: if port == 80:
suffix = "" suffix = ""
else: else:
suffix = ":%d" % port suffix = ":%d" % port
start_browser("http://localhost%s" % suffix) start_browser("http://%s%s" % (prefix, suffix))
# Start the server # Start the server
run_tornado(addr, port, reload) run_tornado(addr, port, reload)