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

Unified Diff: chrome/tools/check_grd_for_unused_strings.py

Issue 8680018: Fix python scripts in src/chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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/tools/check_grd_for_unused_strings.py
diff --git a/chrome/tools/check_grd_for_unused_strings.py b/chrome/tools/check_grd_for_unused_strings.py
index 3bc57d713fe2426859742268ff1cde4ffab364b3..72cc5ff9b527b45b2b5f99406011bbe977abf6a8 100755
--- a/chrome/tools/check_grd_for_unused_strings.py
+++ b/chrome/tools/check_grd_for_unused_strings.py
@@ -1,5 +1,4 @@
-#!/usr/bin/python
-
+#!/usr/bin/env python
# Copyright (c) 2010 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.
@@ -111,7 +110,7 @@ def CheckForUnusedGrdIDsInSources(grd_files, src_dirs):
return 0
-if __name__ == '__main__':
+def main():
# script lives in src/chrome/tools
chrome_tools_dir = os.path.dirname(os.path.abspath(sys.argv[0]))
src_dir = os.path.dirname(os.path.dirname(chrome_tools_dir))
@@ -162,4 +161,8 @@ if __name__ == '__main__':
os.path.join(src_dir, 'third_party', 'mozilla_security_manager'),
]
- sys.exit(CheckForUnusedGrdIDsInSources(grd_files, src_dirs))
+ return CheckForUnusedGrdIDsInSources(grd_files, src_dirs)
+
+
+if __name__ == '__main__':
+ sys.exit(main())

Powered by Google App Engine
This is Rietveld 408576698