diff options
Diffstat (limited to 'cloudinit/reporting/__init__.py')
-rw-r--r-- | cloudinit/reporting/__init__.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cloudinit/reporting/__init__.py b/cloudinit/reporting/__init__.py index ed5c7038..06b5b49f 100644 --- a/cloudinit/reporting/__init__.py +++ b/cloudinit/reporting/__init__.py @@ -13,7 +13,7 @@ from ..registry import DictRegistry from .handlers import available_handlers DEFAULT_CONFIG = { - 'logging': {'type': 'log'}, + "logging": {"type": "log"}, } @@ -28,10 +28,11 @@ def update_configuration(config): for handler_name, handler_config in config.items(): if not handler_config: instantiated_handler_registry.unregister_item( - handler_name, force=True) + handler_name, force=True + ) continue handler_config = handler_config.copy() - cls = available_handlers.registered_items[handler_config.pop('type')] + cls = available_handlers.registered_items[handler_config.pop("type")] instantiated_handler_registry.unregister_item(handler_name) instance = cls(**handler_config) instantiated_handler_registry.register_item(handler_name, instance) @@ -39,7 +40,7 @@ def update_configuration(config): def flush_events(): for _, handler in instantiated_handler_registry.registered_items.items(): - if hasattr(handler, 'flush'): + if hasattr(handler, "flush"): handler.flush() |