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

Unified Diff: chrome/browser/chromeos/input_method/litify_proto_file.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
Index: chrome/browser/chromeos/input_method/litify_proto_file.py
diff --git a/chrome/browser/chromeos/input_method/litify_proto_file.py b/chrome/browser/chromeos/input_method/litify_proto_file.py
old mode 100644
new mode 100755
index 6d746673ac7532689a797521056ad8e7e8acf48a..c62d4f63f1b8904a4f6c37ee6a2818468ee9d010
--- a/chrome/browser/chromeos/input_method/litify_proto_file.py
+++ b/chrome/browser/chromeos/input_method/litify_proto_file.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.
@@ -11,22 +11,23 @@ to the input .proto file.
Run it like:
litify_proto_file.py input.proto output.proto
-
"""
import fileinput
import sys
+
def main(argv):
if len(argv) != 3:
print 'Usage: litify_proto_file.py [input] [output]'
- sys.exit(1)
+ return 1
output_file = open(sys.argv[2], 'w')
for line in fileinput.input(sys.argv[1]):
output_file.write(line)
output_file.write("\noption optimize_for = LITE_RUNTIME;\n")
+ return 0
if __name__ == '__main__':
- main(sys.argv)
+ sys.exit(main(sys.argv))
« no previous file with comments | « chrome/browser/chromeos/input_method/gen_ibus_input_methods.py ('k') | chrome/browser/resources/file_manager/bin/squashdir.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698