mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1090485 - Fix mozlog's commandline to accept file arguments for a formatter that is also the stdout default.;r=jgraham
This commit is contained in:
parent
567fd0e731
commit
6330530055
@ -142,7 +142,7 @@ def setup_logging(suite, args, defaults=None):
|
||||
# Keep track of any options passed for formatters.
|
||||
formatter_options = defaultdict(lambda: formatter_option_defaults.copy())
|
||||
# Keep track of formatters and list of streams specified.
|
||||
formatters = {}
|
||||
formatters = defaultdict(list)
|
||||
found = False
|
||||
found_stdout_logger = False
|
||||
if not hasattr(args, 'iteritems'):
|
||||
@ -164,7 +164,6 @@ def setup_logging(suite, args, defaults=None):
|
||||
continue
|
||||
if len(parts) == 2:
|
||||
_, formatter = parts
|
||||
formatters[formatter] = []
|
||||
for value in values:
|
||||
found = True
|
||||
if isinstance(value, basestring):
|
||||
@ -179,12 +178,12 @@ def setup_logging(suite, args, defaults=None):
|
||||
#If there is no user-specified logging, go with the default options
|
||||
if not found:
|
||||
for name, value in defaults.iteritems():
|
||||
formatters[name] = [value]
|
||||
formatters[name].append(value)
|
||||
|
||||
elif not found_stdout_logger and sys.stdout in defaults.values():
|
||||
for name, value in defaults.iteritems():
|
||||
if value == sys.stdout:
|
||||
formatters[name] = [value]
|
||||
formatters[name].append(value)
|
||||
|
||||
setup_handlers(logger, formatters, formatter_options)
|
||||
set_default_logger(logger)
|
||||
|
Loading…
Reference in New Issue
Block a user