Merge pull request #832 from normanjaeckel/Fix_Start_Option
Start Browser on custom IP, fixed #827
This commit is contained in:
commit
6005934e3b
@ -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