Start Browser on custom IP, fixed #827
This commit is contained in:
parent
6b90ef6576
commit
2128e787bf
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user