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

Side by Side Diff: mojo/devtools/common/devtoolslib/shell_config.py

Issue 1323973002: Have 'adb' as the default value for when adb_path is not specified (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Configuration for the shell abstraction. 5 """Configuration for the shell abstraction.
6 6
7 This module declares ShellConfig and knows how to compute it from command-line 7 This module declares ShellConfig and knows how to compute it from command-line
8 arguments, applying any default paths inferred from the checkout, configuration 8 arguments, applying any default paths inferred from the checkout, configuration
9 file, etc. 9 file, etc.
10 """ 10 """
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 shell_config.android = script_args.android 146 shell_config.android = script_args.android
147 shell_config.shell_path = (script_args.shell_path or 147 shell_config.shell_path = (script_args.shell_path or
148 inferred_paths['shell_path']) 148 inferred_paths['shell_path'])
149 shell_config.origin = script_args.origin 149 shell_config.origin = script_args.origin
150 shell_config.map_url_list = script_args.map_url 150 shell_config.map_url_list = script_args.map_url
151 shell_config.map_origin_list = script_args.map_origin 151 shell_config.map_origin_list = script_args.map_origin
152 shell_config.verbose = script_args.verbose 152 shell_config.verbose = script_args.verbose
153 153
154 # Android-only. 154 # Android-only.
155 shell_config.adb_path = (script_args.adb_path or inferred_paths['adb_path']) 155 shell_config.adb_path = (script_args.adb_path or inferred_paths['adb_path'] or
156 'adb')
156 shell_config.target_device = script_args.target_device 157 shell_config.target_device = script_args.target_device
157 shell_config.logcat_tags = script_args.logcat_tags 158 shell_config.logcat_tags = script_args.logcat_tags
158 159
159 # Desktop-only. 160 # Desktop-only.
160 shell_config.use_osmesa = script_args.use_osmesa 161 shell_config.use_osmesa = script_args.use_osmesa
161 162
162 if (shell_config.android and not shell_config.origin and 163 if (shell_config.android and not shell_config.origin and
163 inferred_paths['build_dir_path']): 164 inferred_paths['build_dir_path']):
164 shell_config.origin = inferred_paths['build_dir_path'] 165 shell_config.origin = inferred_paths['build_dir_path']
165 166
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 206
206 if 'content_handlers' in config: 207 if 'content_handlers' in config:
207 try: 208 try:
208 for (mime_type, 209 for (mime_type,
209 content_handler_url) in config['content_handlers'].iteritems(): 210 content_handler_url) in config['content_handlers'].iteritems():
210 shell_config.content_handlers[mime_type] = content_handler_url 211 shell_config.content_handlers[mime_type] = content_handler_url
211 except (ValueError, KeyError): 212 except (ValueError, KeyError):
212 raise ShellConfigurationException('Failed to parse content_handlers in ' 213 raise ShellConfigurationException('Failed to parse content_handlers in '
213 'the config file.') 214 'the config file.')
214 return shell_config 215 return shell_config
OLDNEW
« 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