Index: build/android/generate_emma_html.py |
diff --git a/build/android/generate_emma_html.py b/build/android/generate_emma_html.py |
index 93b0b0e59c5b10eafa3b3c0a97e3d9ebd081f434..463a83687c269fd46fdc2e8a9fa31e5f2c2bdcba 100755 |
--- a/build/android/generate_emma_html.py |
+++ b/build/android/generate_emma_html.py |
@@ -11,6 +11,7 @@ import json |
import optparse |
import os |
import sys |
+import traceback |
from pylib import cmd_helper |
from pylib import constants |
@@ -35,7 +36,7 @@ def _GetFilesWithExt(root_dir, ext): |
return files |
-def main(): |
+def main(argv): |
option_parser = optparse.OptionParser() |
option_parser.add_option('--output', help='HTML output filename.') |
option_parser.add_option('--coverage-dir', default=None, |
@@ -47,7 +48,7 @@ def main(): |
option_parser.add_option('--cleanup', action='store_true', |
help=('If set, removes coverage files generated at ' |
'runtime.')) |
- options, _ = option_parser.parse_args() |
+ options, args = option_parser.parse_args() |
if not (options.coverage_dir and options.metadata_dir and options.output): |
option_parser.error('One or more mandatory options are missing.') |
@@ -87,4 +88,4 @@ def main(): |
if __name__ == '__main__': |
- sys.exit(main()) |
+ sys.exit(main(sys.argv)) |