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

Unified Diff: tools/telemetry/telemetry/results/results_options.py

Issue 585023002: Fixes --output-format default case. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/results/results_options.py
diff --git a/tools/telemetry/telemetry/results/results_options.py b/tools/telemetry/telemetry/results/results_options.py
index 368cd83ee46001c54a5f797bc879177619206928..ebb71320df805e08912ffcccf5ebc1a8d2fe11b6 100644
--- a/tools/telemetry/telemetry/results/results_options.py
+++ b/tools/telemetry/telemetry/results/results_options.py
@@ -26,8 +26,7 @@ def AddResultsOptions(parser):
group.add_option('--chartjson', action='store_true',
help='Output Chart JSON. Ignores --output-format.')
group.add_option('--output-format', action='append', dest='output_formats',
- default=[_OUTPUT_FORMAT_CHOICES[0]],
- choices=_OUTPUT_FORMAT_CHOICES,
+ choices=_OUTPUT_FORMAT_CHOICES, default=[],
help='Output format. Defaults to "%%default". '
'Can be %s.' % ', '.join(_OUTPUT_FORMAT_CHOICES))
group.add_option('-o', '--output',
@@ -78,6 +77,9 @@ def CreateResults(benchmark_metadata, options):
Args:
options: Contains the options specified in AddResultsOptions.
"""
+ if not options.output_formats:
+ options.output_formats = [_OUTPUT_FORMAT_CHOICES[0]]
+
# TODO(chrishenry): It doesn't make sense to have a single output_file flag
# with multiple output formatters. We should explore other possible options:
# - Have an output_file per output formatter
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698