Index: chrome/test/data/autofill/merge/tools/serialize_profiles.py |
diff --git a/chrome/test/data/autofill/merge/tools/serialize_profiles.py b/chrome/test/data/autofill/merge/tools/serialize_profiles.py |
old mode 100644 |
new mode 100755 |
index 5c0c7b133390bc69c008fb56bd5916eabede9975..ac0fa1c83aebaac6c7061f106b6d53e881fff628 |
--- a/chrome/test/data/autofill/merge/tools/serialize_profiles.py |
+++ b/chrome/test/data/autofill/merge/tools/serialize_profiles.py |
@@ -1,3 +1,4 @@ |
+#!/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. |
@@ -8,17 +9,18 @@ import sys |
from autofill_merge_common import SerializeProfiles, ColumnNameToFieldType |
+ |
def main(): |
"""Serializes the autofill_profiles table from the specified database.""" |
if len(sys.argv) != 2: |
print "Usage: python serialize_profiles.py <path/to/database>" |
- return |
+ return 1 |
database = sys.argv[1] |
if not os.path.isfile(database): |
print "Cannot read database at \"%s\"" % database |
- return |
+ return 1 |
# Read the autofill_profile_names table. |
try: |
@@ -77,7 +79,8 @@ def main(): |
profiles[guid].append(("PHONE_HOME_WHOLE_NUMBER", profile[2])) |
print SerializeProfiles(profiles.values()) |
+ return 0 |
if __name__ == '__main__': |
- main() |
+ sys.exit(main()) |