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

Unified Diff: chrome/test/data/autofill/merge/tools/serialize_profiles.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/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())

Powered by Google App Engine
This is Rietveld 408576698