mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Make sure that an iterable is available. Fixes #8556.
This commit is contained in:
parent
341308485e
commit
262bb3e6cf
@ -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 \
|
||||
|
Loading…
Reference in New Issue
Block a user