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

Unified Diff: chrome/tools/process_dumps_linux.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/inconsistent-eol.py ('k') | chrome/tools/webforms_aggregator.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/tools/process_dumps_linux.py
diff --git a/chrome/tools/process_dumps_linux.py b/chrome/tools/process_dumps_linux.py
index 3e3bf3ec230dc67d4054e5f30e1e38c9e4c718d6..1f0ba9d898ecff02b315158d707499b8335805d0 100755
--- a/chrome/tools/process_dumps_linux.py
+++ b/chrome/tools/process_dumps_linux.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/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.
@@ -265,7 +265,9 @@ def main_linux(options, args):
return 0
-if '__main__' == __name__:
+def main():
+ if not sys.platform.startswith('linux'):
+ return 1
parser = optparse.OptionParser()
parser.add_option('', '--processor-dir', type='string', default='',
help='The directory where the processor is installed. '
@@ -291,8 +293,8 @@ if '__main__' == __name__:
'Default: chrome')
(options, args) = parser.parse_args()
+ return main_linux(options, args)
- if sys.platform.startswith('linux'):
- sys.exit(main_linux(options, args))
- else:
- sys.exit(1)
+
+if '__main__' == __name__:
+ sys.exit(main())
« no previous file with comments | « chrome/tools/inconsistent-eol.py ('k') | chrome/tools/webforms_aggregator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698