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)) |