| Index: build/android/pylib/build_utils.py
|
| diff --git a/build/android/pylib/build_utils.py b/build/android/pylib/build_utils.py
|
| index ce7ed9e80dd0ab2a3316527bba562e9897310602..8a2c761524538bdd01473232746f8b284252b835 100644
|
| --- a/build/android/pylib/build_utils.py
|
| +++ b/build/android/pylib/build_utils.py
|
| @@ -3,6 +3,7 @@
|
| # found in the LICENSE file.
|
|
|
| import fnmatch
|
| +import json
|
| import os
|
| import pipes
|
| import shlex
|
| @@ -55,6 +56,17 @@ def ParseGypList(gyp_string):
|
| return shlex.split(gyp_string)
|
|
|
|
|
| +def CheckOptions(options, parser, required=[]):
|
| + for option_name in required:
|
| + if not getattr(options, option_name):
|
| + parser.error('--%s is required' % option_name.replace('_', '-'))
|
| +
|
| +
|
| +def ReadJson(path):
|
| + with open(path, 'r') as jsonfile:
|
| + return json.load(jsonfile)
|
| +
|
| +
|
| # This can be used in most cases like subprocess.check_call. The output,
|
| # particularly when the command fails, better highlights the command's failure.
|
| # This call will directly exit on a failure in the subprocess so that no python
|
|
|