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

Unified Diff: chrome/tools/build/generate_policy_source.py

Issue 8680018: Fix python scripts in src/chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright Created 9 years, 1 month 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 | « chrome/tools/build/appid.py ('k') | chrome/tools/build/win/create_installer_archive.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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())
« no previous file with comments | « chrome/tools/build/appid.py ('k') | chrome/tools/build/win/create_installer_archive.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698