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

Unified Diff: tools/symsrc/source_index.py

Issue 8678023: Fix python scripts in src/tools/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes 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: tools/symsrc/source_index.py
diff --git a/tools/symsrc/source_index.py b/tools/symsrc/source_index.py
old mode 100644
new mode 100755
index 816087262936cfca997be614b4f7179d14ec71ec..01baf94c6092092b97269399cba34d89f48249f4
--- a/tools/symsrc/source_index.py
+++ b/tools/symsrc/source_index.py
@@ -1,6 +1,5 @@
#!/usr/bin/env python
-
-# Copyright (c) 2008 The Chromium Authors. All rights reserved.
+# 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.
@@ -190,13 +189,19 @@ def UpdatePDB(pdb_filename, verbose=False):
WriteSourceStream(pdb_filename, '\r\n'.join(lines))
-if __name__ == '__main__':
+
+def main():
if len(sys.argv) < 2 or len(sys.argv) > 3:
print "usage: file.pdb [-v]"
- sys.exit(1)
+ return 1
verbose = False
if len(sys.argv) == 3:
verbose = (sys.argv[2] == '-v')
UpdatePDB(sys.argv[1], verbose=verbose)
+ return 0
+
+
+if __name__ == '__main__':
+ sys.exit(main())

Powered by Google App Engine
This is Rietveld 408576698