Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(647)

Unified Diff: mojo/devtools/common/devtoolslib/shell_arguments.py

Issue 1317813004: Don't print the dev server config if not asked. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/devtools/common/devtoolslib/shell_arguments.py
diff --git a/mojo/devtools/common/devtoolslib/shell_arguments.py b/mojo/devtools/common/devtoolslib/shell_arguments.py
index 7e46b01abd0e8e7e636007e3a8bfccdfa1b989a2..4a12fd5312364cd625fb739529f5e3baa756ccfa 100644
--- a/mojo/devtools/common/devtoolslib/shell_arguments.py
+++ b/mojo/devtools/common/devtoolslib/shell_arguments.py
@@ -145,7 +145,7 @@ def append_to_argument(arguments, key, value, delimiter=","):
return arguments
-def _configure_dev_server(shell, shell_args, dev_server_config):
+def _configure_dev_server(shell, shell_args, dev_server_config, verbose):
"""Sets up a dev server on the host according to |dev_server_config|.
Args:
@@ -161,10 +161,12 @@ def _configure_dev_server(shell, shell_args, dev_server_config):
server_url = shell.serve_local_directories(dev_server_config.mappings,
port=port)
shell_args.append('--map-origin=%s=%s' % (dev_server_config.host, server_url))
- print "Configured %s locally at %s to serve:" % (dev_server_config.host,
- server_url)
- for mapping_prefix, mapping_path in dev_server_config.mappings:
- print " /%s -> %s" % (mapping_prefix, mapping_path)
+
+ if verbose:
+ print "Configured %s locally at %s to serve:" % (dev_server_config.host,
+ server_url)
+ for mapping_prefix, mapping_path in dev_server_config.mappings:
+ print " /%s -> %s" % (mapping_prefix, mapping_path)
return shell_args
@@ -225,6 +227,7 @@ def get_shell(shell_config, shell_args):
content_handler_url))
for dev_server_config in shell_config.dev_servers:
- shell_args = _configure_dev_server(shell, shell_args, dev_server_config)
+ shell_args = _configure_dev_server(shell, shell_args, dev_server_config,
+ shell_config.verbose)
return shell, shell_args
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698