From 22e8457894afc791673aaa80fd3cca31988c19fd Mon Sep 17 00:00:00 2001 From: Andy Kittner Date: Tue, 22 Jan 2013 20:36:04 +0100 Subject: [PATCH] Add an option to suppress starting of web browser (closes #436) --- openslides/main.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/openslides/main.py b/openslides/main.py index d25305a4d..b94eebfda 100755 --- a/openslides/main.py +++ b/openslides/main.py @@ -90,6 +90,10 @@ def process_options(argv=None): parser.add_option( "--no-reload", action="store_true", 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( "--version", action="store_true", help="Show version and exit.") @@ -172,7 +176,11 @@ def _main(opts, database_path=None): extra_args = ['--noreload'] else: 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):