Make sure that an iterable is available. Fixes #8556.

This commit is contained in:
Pedro Algarvio 2013-11-15 12:58:56 +00:00
parent 341308485e
commit 262bb3e6cf

View File

@ -513,8 +513,6 @@ def setup_extended_logging(opts):
handlers = get_handlers_func()
if isinstance(handlers, types.GeneratorType):
handlers = list(handlers)
elif isinstance(handlers, string_types):
handlers = [handlers]
elif handlers is False or handlers == [False]:
# A false return value means not configuring any logging handler on
# purpose
@ -524,6 +522,9 @@ def setup_extended_logging(opts):
'purpose. Continuing...'.format(name)
)
continue
else:
# Make sure we have an iterable
handlers = [handlers]
for handler in handlers:
if not handler and \