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

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: 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
« no previous file with comments | « chrome/tools/build/win/sort_sln.py ('k') | chrome/tools/extract_actions.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b0f8cb8fb417406daf60b9baf2e6caa4d8023f38 100755
--- a/chrome/tools/check_grd_for_unused_strings.py
+++ b/chrome/tools/check_grd_for_unused_strings.py
@@ -1,6 +1,5 @@
-#!/usr/bin/python
-
-# Copyright (c) 2010 The Chromium Authors. All rights reserved.
+#!/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.
@@ -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())
« no previous file with comments | « chrome/tools/build/win/sort_sln.py ('k') | chrome/tools/extract_actions.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698