Closed
Bug 1073093
Opened 12 years ago
Closed 11 years ago
[mozlog] commandline.py should only add a fmt_option if the associated formatter is in log_formatters
Categories
(Testing :: Mozbase, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla36
People
(Reporter: ahal, Assigned: ahal)
Details
Attachments
(1 file)
|
2.41 KB,
patch
|
chmanchester
:
review+
|
Details | Diff | Splinter Review |
E.g:
If a program removes --log-foo from the global log_formatters dict, --log-foo-level will still be added to the argument parser.
| Assignee | ||
Comment 1•12 years ago
|
||
Attachment #8495432 -
Flags: review?(cmanchester)
Comment 2•12 years ago
|
||
Comment on attachment 8495432 [details] [diff] [review]
mozlog_fmt_options
Review of attachment 8495432 [details] [diff] [review]:
-----------------------------------------------------------------
I don't see any harm in this, but I guess bug 1066643 might account for this.
::: testing/mozbase/mozlog/mozlog/structured/commandline.py
@@ +63,5 @@
> help=help_str)
> for optname, (cls, help_str, formatters) in fmt_options.iteritems():
> for fmt in formatters:
> + # make sure fmt wasn't removed from log_formatters
> + if fmt in log_formatters.keys():
Could be just 'if fmt in log_formatters:'
Attachment #8495432 -
Flags: review?(cmanchester) → review+
| Assignee | ||
Comment 3•11 years ago
|
||
Comment 4•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in
before you can comment on or make changes to this bug.
Description
•