| Index: chrome/tools/extract_histograms.py
|
| diff --git a/chrome/tools/extract_histograms.py b/chrome/tools/extract_histograms.py
|
| index 8c002f3b422f1d1ddb323aff56d1ceed08b1701d..fcc1ce0740bf7e4cc0a274c8159289b08689312d 100755
|
| --- a/chrome/tools/extract_histograms.py
|
| +++ b/chrome/tools/extract_histograms.py
|
| @@ -1,4 +1,4 @@
|
| -#!/usr/bin/python
|
| +#!/usr/bin/env python
|
| # Copyright (c) 2009 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.
|
| @@ -35,6 +35,7 @@ def GrepForHistograms(path, histograms):
|
| if match:
|
| histograms.add(match.group(1))
|
|
|
| +
|
| def WalkDirectory(root_path, histograms):
|
| for path, dirs, files in os.walk(root_path):
|
| if '.svn' in dirs:
|
| @@ -44,6 +45,7 @@ def WalkDirectory(root_path, histograms):
|
| if ext == '.cc':
|
| GrepForHistograms(os.path.join(path, file), histograms)
|
|
|
| +
|
| def main(argv):
|
| histograms = set()
|
|
|
| @@ -53,6 +55,8 @@ def main(argv):
|
| # Print out the histograms as a sorted list.
|
| for histogram in sorted(histograms):
|
| print histogram
|
| + return 0
|
| +
|
|
|
| if '__main__' == __name__:
|
| - main(sys.argv)
|
| + sys.exit(main(sys.argv))
|
|
|