| Index: chrome/tools/build/generate_policy_source.py
|
| diff --git a/chrome/tools/build/generate_policy_source.py b/chrome/tools/build/generate_policy_source.py
|
| old mode 100644
|
| new mode 100755
|
| index ad234f2f6871deee1fbe585e1b39e0f3296d0fac..e405713bac68efc2794b45e07e0c299a21775bd1
|
| --- a/chrome/tools/build/generate_policy_source.py
|
| +++ b/chrome/tools/build/generate_policy_source.py
|
| @@ -1,4 +1,4 @@
|
| -#!/usr/bin/python
|
| +#!/usr/bin/env python
|
| # Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| # Use of this source code is governed by a BSD-style license that can be
|
| # found in the LICENSE file.
|
| @@ -51,7 +51,7 @@ def main():
|
| if len(args) != 3:
|
| print "exactly platform, chromium_os flag and input file must be specified."
|
| parser.print_help()
|
| - sys.exit(2)
|
| + return 2
|
| template_file_contents = _LoadJSONFile(args[2]);
|
| if opts.header_path is not None:
|
| _WritePolicyConstantHeader(template_file_contents, args, opts);
|
| @@ -63,6 +63,7 @@ def main():
|
| _WriteProtobuf(template_file_contents, args, opts.proto_path)
|
| if opts.decoder_path is not None:
|
| _WriteProtobufParser(template_file_contents, args, opts.decoder_path)
|
| + return 0
|
|
|
|
|
| #------------------ shared helpers ---------------------------------#
|
| @@ -462,6 +463,5 @@ def _WriteProtobufParser(template_file_contents, args, outfilepath):
|
| f.write(CPP_FOOT)
|
|
|
|
|
| -#------------------ main() -----------------------------------------#
|
| if __name__ == '__main__':
|
| - main();
|
| + sys.exit(main())
|
|
|