blob: dd5caa1783ce559638e68f8ac6af5b5568a792dd [file] [log] [blame]
Keun Soo Yimb293fdb2016-09-21 16:03:44 -07001#!/usr/bin/env python
2#
3# Copyright 2016 - The Android Open Source Project
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
Sam Chiu42ac7c52018-10-22 12:27:34 +080016r"""
17Welcome to
18 ___ _______ ____ __ _____
19 / _ |/ ___/ / / __ \/ / / / _ \
20 / __ / /__/ /__/ /_/ / /_/ / // /
21/_/ |_\___/____/\____/\____/____/
Keun Soo Yimb293fdb2016-09-21 16:03:44 -070022
Sam Chiu42ac7c52018-10-22 12:27:34 +080023
24This a tool to create Android Virtual Devices locally/remotely.
Keun Soo Yimb293fdb2016-09-21 16:03:44 -070025
26- Prerequisites:
Sam Chiu42ac7c52018-10-22 12:27:34 +080027 The manual will be available at
28 https://android.googlesource.com/platform/tools/acloud/+/master/README.md
Keun Soo Yimb293fdb2016-09-21 16:03:44 -070029
Sam Chiu42ac7c52018-10-22 12:27:34 +080030- To get started:
31 - Create instances:
32 1) To create a remote cuttlefish instance with the local built image.
33 Example:
chojoyce1c4ecc92018-12-06 14:16:44 +080034 $ acloud create --local-image
35 Or specify built image dir:
36 $ acloud create --local-image /tmp/image_dir
Sam Chiu42ac7c52018-10-22 12:27:34 +080037 2) To create a local cuttlefish instance using the image which has been
38 built out in your workspace.
39 Example:
40 $ acloud create --local-instance --local-image
Keun Soo Yimb293fdb2016-09-21 16:03:44 -070041
Sam Chiu42ac7c52018-10-22 12:27:34 +080042 - Delete instances:
43 $ acloud delete
Keun Soo Yimb293fdb2016-09-21 16:03:44 -070044
Sam Chiu42ac7c52018-10-22 12:27:34 +080045Try $acloud [cmd] --help for further details.
Keun Soo Yimb293fdb2016-09-21 16:03:44 -070046
Keun Soo Yimb293fdb2016-09-21 16:03:44 -070047"""
Kevin Cheng1ea015f2019-01-08 09:10:58 -080048
49from __future__ import print_function
Keun Soo Yimb293fdb2016-09-21 16:03:44 -070050import argparse
51import getpass
52import logging
Kevin Cheng1ea015f2019-01-08 09:10:58 -080053import platform
Keun Soo Yimb293fdb2016-09-21 16:03:44 -070054import sys
55
Kevin Cheng1ea015f2019-01-08 09:10:58 -080056# TODO: Remove this once we switch over to embedded launcher.
57# Exit out if python version is < 2.7.13 due to b/120883119.
58if (sys.version_info.major == 2
59 and sys.version_info.minor == 7
60 and sys.version_info.micro < 13):
61 print("Acloud requires python version 2.7.13+ (currently @ %d.%d.%d)" %
62 (sys.version_info.major, sys.version_info.minor,
63 sys.version_info.micro))
64 print("Update your 2.7 python with:")
65 # pylint: disable=invalid-name
66 os_type = platform.system().lower()
67 if os_type == "linux":
68 print(" apt-get install python2.7")
69 elif os_type == "darwin":
70 print(" brew install python@2 (and then follow instructions at "
71 "https://docs.python-guide.org/starting/install/osx/)")
72 print(" - or -")
73 print(" POSIXLY_CORRECT=1 port -N install python27")
74 sys.exit(1)
75
Kevin Chengf4137c62018-05-22 16:06:58 -070076# Needed to silence oauth2client.
Sam Chiu29d858f2018-08-14 20:06:25 +080077# This is a workaround to get rid of below warning message:
78# 'No handlers could be found for logger "oauth2client.contrib.multistore_file'
79# TODO(b/112803893): Remove this code once bug is fixed.
80OAUTH2_LOGGER = logging.getLogger('oauth2client.contrib.multistore_file')
81OAUTH2_LOGGER.setLevel(logging.CRITICAL)
82OAUTH2_LOGGER.addHandler(logging.FileHandler("/dev/null"))
Kevin Chengb5963882018-05-09 00:06:27 -070083
Kevin Chengf4137c62018-05-22 16:06:58 -070084# pylint: disable=wrong-import-position
Sam Chiu7de3b232018-12-06 19:45:52 +080085from acloud import errors
Kevin Cheng6001db32018-10-23 12:34:20 -070086from acloud.create import create
87from acloud.create import create_args
88from acloud.delete import delete
89from acloud.delete import delete_args
cylan4569dca2018-11-02 12:12:53 +080090from acloud.reconnect import reconnect
91from acloud.reconnect import reconnect_args
Sam Chiu56c58892018-10-25 09:53:19 +080092from acloud.list import list as list_instances
93from acloud.list import list_args
Kevin Cheng6001db32018-10-23 12:34:20 -070094from acloud.metrics import metrics
Keun Soo Yimb293fdb2016-09-21 16:03:44 -070095from acloud.public import acloud_common
96from acloud.public import config
97from acloud.public import device_driver
Kevin Chengb5963882018-05-09 00:06:27 -070098from acloud.public.actions import create_cuttlefish_action
99from acloud.public.actions import create_goldfish_action
Kevin Chengee6030f2018-06-26 10:55:30 -0700100from acloud.setup import setup
101from acloud.setup import setup_args
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700102
Sam Chiu445941f2018-10-04 11:54:40 +0800103LOGGING_FMT = "%(asctime)s |%(levelname)s| %(module)s:%(lineno)s| %(message)s"
Sam Chiu29d858f2018-08-14 20:06:25 +0800104ACLOUD_LOGGER = "acloud"
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700105
106# Commands
Kevin Chengb5963882018-05-09 00:06:27 -0700107CMD_CREATE_CUTTLEFISH = "create_cf"
108CMD_CREATE_GOLDFISH = "create_gf"
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700109CMD_CLEANUP = "cleanup"
Fang Deng69498c32017-03-02 14:29:30 -0800110CMD_SSHKEY = "project_sshkey"
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700111
112
Kevin Cheng3031f8a2018-05-16 13:21:51 -0700113# pylint: disable=too-many-statements
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700114def _ParseArgs(args):
115 """Parse args.
116
117 Args:
118 args: Argument list passed from main.
119
120 Returns:
121 Parsed args.
122 """
Kevin Cheng3031f8a2018-05-16 13:21:51 -0700123 usage = ",".join([
Sam Chiue669ef72018-10-16 16:23:37 +0800124 setup_args.CMD_SETUP,
125 create_args.CMD_CREATE,
Kevin Chengab0b36b2018-08-02 14:38:30 -0700126 CMD_CREATE_CUTTLEFISH,
127 CMD_CREATE_GOLDFISH,
Sam Chiu56c58892018-10-25 09:53:19 +0800128 list_args.CMD_LIST,
Kevin Chengeb85e862018-10-09 15:35:13 -0700129 delete_args.CMD_DELETE,
cylan4569dca2018-11-02 12:12:53 +0800130 reconnect_args.CMD_RECONNECT,
Kevin Cheng3031f8a2018-05-16 13:21:51 -0700131 ])
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700132 parser = argparse.ArgumentParser(
133 description=__doc__,
134 formatter_class=argparse.RawDescriptionHelpFormatter,
Sam Chiu42ac7c52018-10-22 12:27:34 +0800135 usage="acloud {" + usage + "} ...")
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700136 subparsers = parser.add_subparsers()
137 subparser_list = []
138
Kevin Chengb5963882018-05-09 00:06:27 -0700139 # Command "create_cf", create cuttlefish instances
140 create_cf_parser = subparsers.add_parser(CMD_CREATE_CUTTLEFISH)
141 create_cf_parser.required = False
142 create_cf_parser.set_defaults(which=CMD_CREATE_CUTTLEFISH)
143 create_cf_parser.add_argument(
Kevin Chengb5963882018-05-09 00:06:27 -0700144 "--branch",
145 type=str,
146 dest="branch",
147 help="Android branch, e.g. git_master")
148 create_cf_parser.add_argument(
Kevin Chengb5963882018-05-09 00:06:27 -0700149 "--kernel_build_id",
150 type=str,
151 dest="kernel_build_id",
152 required=False,
153 help="Android kernel build id, e.g. 4586590. This is to test a new"
154 " kernel build with a particular Android build (--build_id). If not"
155 " specified, the kernel that's bundled with the Android build would"
156 " be used.")
Kevin Chengb5963882018-05-09 00:06:27 -0700157
Kevin Cheng3087af52018-08-13 13:26:50 -0700158 create_args.AddCommonCreateArgs(create_cf_parser)
Kevin Chengb5963882018-05-09 00:06:27 -0700159 subparser_list.append(create_cf_parser)
160
161 # Command "create_gf", create goldfish instances
162 # In order to create a goldfish device we need the following parameters:
163 # 1. The emulator build we wish to use, this is the binary that emulates
164 # an android device. See go/emu-dev for more
165 # 2. A system-image. This is the android release we wish to run on the
166 # emulated hardware.
167 create_gf_parser = subparsers.add_parser(CMD_CREATE_GOLDFISH)
168 create_gf_parser.required = False
169 create_gf_parser.set_defaults(which=CMD_CREATE_GOLDFISH)
170 create_gf_parser.add_argument(
Kevin Chengb5963882018-05-09 00:06:27 -0700171 "--branch",
172 type=str,
173 dest="branch",
174 help="Android branch, e.g. git_master")
175 create_gf_parser.add_argument(
Kevin Chengb5963882018-05-09 00:06:27 -0700176 "--emulator_build_id",
177 type=str,
178 dest="emulator_build_id",
179 required=False,
180 help="Emulator build used to run the images. e.g. 4669466.")
181 create_gf_parser.add_argument(
182 "--gpu",
183 type=str,
184 dest="gpu",
185 required=False,
186 default=None,
187 help="GPU accelerator to use if any."
188 " e.g. nvidia-tesla-k80, omit to use swiftshader")
189 create_gf_parser.add_argument(
Kevin Chengbced4af2018-06-26 10:35:01 -0700190 "--base_image",
191 type=str,
192 dest="base_image",
193 required=False,
194 help="Name of the goldfish base image to be used to create the instance. "
195 "This will override stable_goldfish_host_image_name from config. "
196 "e.g. emu-dev-cts-061118")
Kevin Chengb5963882018-05-09 00:06:27 -0700197
Kevin Cheng3087af52018-08-13 13:26:50 -0700198 create_args.AddCommonCreateArgs(create_gf_parser)
Kevin Chengb5963882018-05-09 00:06:27 -0700199 subparser_list.append(create_gf_parser)
200
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700201 # Command "cleanup"
202 cleanup_parser = subparsers.add_parser(CMD_CLEANUP)
203 cleanup_parser.required = False
204 cleanup_parser.set_defaults(which=CMD_CLEANUP)
205 cleanup_parser.add_argument(
206 "--expiration_mins",
207 type=int,
208 dest="expiration_mins",
209 required=True,
210 help="Garbage collect all gce instances, gce images, cached disk "
211 "images that are older than |expiration_mins|.")
212 subparser_list.append(cleanup_parser)
213
Fang Deng69498c32017-03-02 14:29:30 -0800214 # Command "project_sshkey"
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700215 sshkey_parser = subparsers.add_parser(CMD_SSHKEY)
216 sshkey_parser.required = False
217 sshkey_parser.set_defaults(which=CMD_SSHKEY)
218 sshkey_parser.add_argument(
219 "--user",
220 type=str,
221 dest="user",
222 default=getpass.getuser(),
223 help="The user name which the sshkey belongs to, default to: %s." %
224 getpass.getuser())
225 sshkey_parser.add_argument(
226 "--ssh_rsa_path",
227 type=str,
228 dest="ssh_rsa_path",
229 required=True,
Fang Deng69498c32017-03-02 14:29:30 -0800230 help="Absolute path to the file that contains the public rsa key "
Kevin Cheng3031f8a2018-05-16 13:21:51 -0700231 "that will be added as project-wide ssh key.")
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700232 subparser_list.append(sshkey_parser)
233
Kevin Chengeb85e862018-10-09 15:35:13 -0700234 # Command "create"
235 subparser_list.append(create_args.GetCreateArgParser(subparsers))
236
Kevin Chengee6030f2018-06-26 10:55:30 -0700237 # Command "setup"
238 subparser_list.append(setup_args.GetSetupArgParser(subparsers))
239
Sam Chiu56c58892018-10-25 09:53:19 +0800240 # Command "delete"
Kevin Chengeb85e862018-10-09 15:35:13 -0700241 subparser_list.append(delete_args.GetDeleteArgParser(subparsers))
242
Sam Chiu56c58892018-10-25 09:53:19 +0800243 # Command "list"
244 subparser_list.append(list_args.GetListArgParser(subparsers))
245
cylan4569dca2018-11-02 12:12:53 +0800246 # Command "Reconnect"
247 subparser_list.append(reconnect_args.GetReconnectArgParser(subparsers))
248
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700249 # Add common arguments.
Kevin Chengb21d7712018-05-24 14:54:55 -0700250 for subparser in subparser_list:
251 acloud_common.AddCommonArguments(subparser)
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700252
253 return parser.parse_args(args)
254
255
herbertxue2625b042018-08-16 23:28:20 +0800256# pylint: disable=too-many-branches
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700257def _VerifyArgs(parsed_args):
258 """Verify args.
259
260 Args:
261 parsed_args: Parsed args.
262
263 Raises:
264 errors.CommandArgError: If args are invalid.
265 """
herbertxue2625b042018-08-16 23:28:20 +0800266 if parsed_args.which == create_args.CMD_CREATE:
267 create_args.VerifyArgs(parsed_args)
Kevin Cheng84d3eed2018-08-16 15:16:00 -0700268 if parsed_args.which == CMD_CREATE_CUTTLEFISH:
Kevin Chengb5963882018-05-09 00:06:27 -0700269 if not parsed_args.build_id or not parsed_args.build_target:
Kevin Cheng3031f8a2018-05-16 13:21:51 -0700270 raise errors.CommandArgError(
271 "Must specify --build_id and --build_target")
Kevin Chengb5963882018-05-09 00:06:27 -0700272 if parsed_args.which == CMD_CREATE_GOLDFISH:
Kevin Cheng84d3eed2018-08-16 15:16:00 -0700273 if not parsed_args.emulator_build_id and not parsed_args.build_id:
274 raise errors.CommandArgError("Must specify either "
275 "--emulator_build_id or --build_id")
276 if not parsed_args.build_target:
277 raise errors.CommandArgError("Must specify --build_target")
Kevin Chengb5963882018-05-09 00:06:27 -0700278
279 if parsed_args.which in [
Kevin Cheng3087af52018-08-13 13:26:50 -0700280 create_args.CMD_CREATE, CMD_CREATE_CUTTLEFISH, CMD_CREATE_GOLDFISH
Kevin Chengb5963882018-05-09 00:06:27 -0700281 ]:
Kevin Cheng3031f8a2018-05-16 13:21:51 -0700282 if (parsed_args.serial_log_file
283 and not parsed_args.serial_log_file.endswith(".tar.gz")):
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700284 raise errors.CommandArgError(
285 "--serial_log_file must ends with .tar.gz")
Kevin Cheng3031f8a2018-05-16 13:21:51 -0700286 if (parsed_args.logcat_file
287 and not parsed_args.logcat_file.endswith(".tar.gz")):
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700288 raise errors.CommandArgError(
289 "--logcat_file must ends with .tar.gz")
290
291
Sam Chiu29d858f2018-08-14 20:06:25 +0800292def _SetupLogging(log_file, verbose):
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700293 """Setup logging.
294
Sam Chiu29d858f2018-08-14 20:06:25 +0800295 This function define the logging policy in below manners.
296 - without -v , -vv ,--log_file:
297 Only display critical log and print() message on screen.
298
299 - with -v:
300 Display INFO log and set StreamHandler to acloud parent logger to turn on
301 ONLY acloud modules logging.(silence all 3p libraries)
302
303 - with -vv:
304 Display INFO/DEBUG log and set StreamHandler to root logger to turn on all
305 acloud modules and 3p libraries logging.
306
307 - with --log_file.
308 Dump logs to FileHandler with DEBUG level.
309
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700310 Args:
Sam Chiu29d858f2018-08-14 20:06:25 +0800311 log_file: String, if not None, dump the log to log file.
312 verbose: Int, if verbose = 1(-v), log at INFO level and turn on
313 logging on libraries to a StreamHandler.
314 If verbose = 2(-vv), log at DEBUG level and turn on logging on
315 all libraries and 3rd party libraries to a StreamHandler.
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700316 """
Sam Chiu29d858f2018-08-14 20:06:25 +0800317 # Define logging level and hierarchy by verbosity.
318 shandler_level = None
319 logger = None
320 if verbose == 0:
321 shandler_level = logging.CRITICAL
322 logger = logging.getLogger(ACLOUD_LOGGER)
323 elif verbose == 1:
324 shandler_level = logging.INFO
325 logger = logging.getLogger(ACLOUD_LOGGER)
326 elif verbose > 1:
327 shandler_level = logging.DEBUG
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700328 logger = logging.getLogger()
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700329
Sam Chiu29d858f2018-08-14 20:06:25 +0800330 # Add StreamHandler by default.
331 shandler = logging.StreamHandler()
332 shandler.setFormatter(logging.Formatter(LOGGING_FMT))
333 shandler.setLevel(shandler_level)
334 logger.addHandler(shandler)
335 # Set the default level to DEBUG, the other handlers will handle
336 # their own levels via the args supplied (-v and --log_file).
337 logger.setLevel(logging.DEBUG)
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700338
Sam Chiu29d858f2018-08-14 20:06:25 +0800339 # Add FileHandler if log_file is provided.
Sam Chiufde41e92018-08-07 18:37:02 +0800340 if log_file:
Sam Chiu29d858f2018-08-14 20:06:25 +0800341 fhandler = logging.FileHandler(filename=log_file)
342 fhandler.setFormatter(logging.Formatter(LOGGING_FMT))
343 fhandler.setLevel(logging.DEBUG)
344 logger.addHandler(fhandler)
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700345
346
Erwin Jansen95559242018-11-08 15:38:18 -0800347def main(argv=None):
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700348 """Main entry.
349
350 Args:
351 argv: A list of system arguments.
352
353 Returns:
354 0 if success. None-zero if fails.
355 """
Erwin Jansen95559242018-11-08 15:38:18 -0800356 if argv is None:
357 argv = sys.argv[1:]
358
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700359 args = _ParseArgs(argv)
Sam Chiu29d858f2018-08-14 20:06:25 +0800360 _SetupLogging(args.log_file, args.verbose)
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700361 _VerifyArgs(args)
362
Sam Chiuc64f3432018-08-17 11:19:06 +0800363 cfg = config.GetAcloudConfig(args)
Kevin Cheng3087af52018-08-13 13:26:50 -0700364 # TODO: Move this check into the functions it is actually needed.
Fang Dengcef4b112017-03-02 11:20:17 -0800365 # Check access.
Kevin Cheng3087af52018-08-13 13:26:50 -0700366 # device_driver.CheckAccess(cfg)
Fang Dengcef4b112017-03-02 11:20:17 -0800367
Kevin Cheng6001db32018-10-23 12:34:20 -0700368 metrics.LogUsage()
Kevin Chengee6030f2018-06-26 10:55:30 -0700369 report = None
chojoyce7a361732018-11-26 16:26:13 +0800370 if args.which == create_args.CMD_CREATE:
Kevin Chengc3d0d5e2018-08-14 14:22:44 -0700371 create.Run(args)
Kevin Chengb5963882018-05-09 00:06:27 -0700372 elif args.which == CMD_CREATE_CUTTLEFISH:
373 report = create_cuttlefish_action.CreateDevices(
374 cfg=cfg,
375 build_target=args.build_target,
376 build_id=args.build_id,
377 kernel_build_id=args.kernel_build_id,
378 num=args.num,
379 serial_log_file=args.serial_log_file,
380 logcat_file=args.logcat_file,
Kevin Cheng86d43c72018-08-30 10:59:14 -0700381 autoconnect=args.autoconnect,
382 report_internal_ip=args.report_internal_ip)
Kevin Chengb5963882018-05-09 00:06:27 -0700383 elif args.which == CMD_CREATE_GOLDFISH:
384 report = create_goldfish_action.CreateDevices(
385 cfg=cfg,
386 build_target=args.build_target,
387 build_id=args.build_id,
388 emulator_build_id=args.emulator_build_id,
389 gpu=args.gpu,
390 num=args.num,
391 serial_log_file=args.serial_log_file,
392 logcat_file=args.logcat_file,
Kevin Cheng84d3eed2018-08-16 15:16:00 -0700393 autoconnect=args.autoconnect,
Kevin Cheng86d43c72018-08-30 10:59:14 -0700394 branch=args.branch,
395 report_internal_ip=args.report_internal_ip)
Sam Chiu56c58892018-10-25 09:53:19 +0800396 elif args.which == delete_args.CMD_DELETE:
Kevin Chengeb85e862018-10-09 15:35:13 -0700397 report = delete.Run(args)
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700398 elif args.which == CMD_CLEANUP:
399 report = device_driver.Cleanup(cfg, args.expiration_mins)
Sam Chiu56c58892018-10-25 09:53:19 +0800400 elif args.which == list_args.CMD_LIST:
401 list_instances.Run(args)
cylan4569dca2018-11-02 12:12:53 +0800402 elif args.which == reconnect_args.CMD_RECONNECT:
403 reconnect.Run(args)
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700404 elif args.which == CMD_SSHKEY:
405 report = device_driver.AddSshRsa(cfg, args.user, args.ssh_rsa_path)
Kevin Chengee6030f2018-06-26 10:55:30 -0700406 elif args.which == setup_args.CMD_SETUP:
herbertxue34776bb2018-07-03 21:57:48 +0800407 setup.Run(args)
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700408 else:
409 sys.stderr.write("Invalid command %s" % args.which)
410 return 2
411
herbertxue07293a32018-11-05 20:40:11 +0800412 if report and args.report_file:
Kevin Chengee6030f2018-06-26 10:55:30 -0700413 report.Dump(args.report_file)
414 if report.errors:
415 msg = "\n".join(report.errors)
416 sys.stderr.write("Encountered the following errors:\n%s\n" % msg)
417 return 1
Keun Soo Yimb293fdb2016-09-21 16:03:44 -0700418 return 0
Tri Vo8e292532016-10-01 16:55:51 -0700419
420
421if __name__ == "__main__":
422 main(sys.argv[1:])