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

Unified Diff: chrome/tools/webforms_aggregator.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/process_dumps_linux.py ('k') | chrome/tools/webforms_aggregator_tests.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/tools/webforms_aggregator.py
diff --git a/chrome/tools/webforms_aggregator.py b/chrome/tools/webforms_aggregator.py
old mode 100644
new mode 100755
index 3d5327b37fb49e4ea0be69c8bc91fb3fd5d2270f..16e52732c497177166005ef0405496254773ee0f
--- a/chrome/tools/webforms_aggregator.py
+++ b/chrome/tools/webforms_aggregator.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.
@@ -722,7 +722,6 @@ class ThreadedCrawler(object):
def main():
- # Command line options.
usage = 'usage: %prog [options] single_url_or_urls_filename'
parser = optparse.OptionParser(usage)
parser.add_option(
@@ -734,7 +733,7 @@ def main():
if options.log_level not in ['DEBUG', 'INFO', 'WARNING', 'ERROR']:
print 'Wrong log_level argument.'
parser.print_help()
- sys.exit(1)
+ return 1
options.log_level = getattr(logging, options.log_level)
if len(args) != 1:
@@ -762,7 +761,8 @@ def main():
logger.info('Started at: %s\n', t0)
logger.info('Ended at: %s\n', t1)
logger.info('Total execution time: %s\n', delta_t)
+ return 0
if __name__ == "__main__":
- main()
+ sys.exit(main())
« no previous file with comments | « chrome/tools/process_dumps_linux.py ('k') | chrome/tools/webforms_aggregator_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698