Merge pull request #86 from andkit/no_browser

Add an option to suppress starting of web browser (closes #436)
This commit is contained in:
Oskar Hahn 2013-01-22 12:25:59 -08:00
commit 619d14340b

View File

@ -90,6 +90,10 @@ def process_options(argv=None):
parser.add_option( parser.add_option(
"--no-reload", action="store_true", "--no-reload", action="store_true",
help="Do not reload the development server.") help="Do not reload the development server.")
parser.add_option(
"--no-browser",
action="store_false", dest="start_browser", default=True,
help="Do not automatically start web browser.")
parser.add_option( parser.add_option(
"--version", action="store_true", "--version", action="store_true",
help="Show version and exit.") help="Show version and exit.")
@ -172,7 +176,11 @@ def _main(opts, database_path=None):
extra_args = ['--noreload'] extra_args = ['--noreload']
else: else:
extra_args = [] extra_args = []
start_openslides(addr, port, start_browser_url=url, extra_args=extra_args)
if opts.start_browser:
start_browser(url)
start_openslides(addr, port, extra_args=extra_args)
def create_settings(settings_path, database_path=None): def create_settings(settings_path, database_path=None):