diff options
| author | Chad Smith <chad.smith@canonical.com> | 2018-10-03 12:10:23 -0600 |
|---|---|---|
| committer | Chad Smith <chad.smith@canonical.com> | 2018-10-03 12:10:23 -0600 |
| commit | d6347e1c439eda7f43d9620dac2b461e980e1ae9 (patch) | |
| tree | 08410263488d11a2a29edcc620575ed1b028100e /cloudinit/reporting/__init__.py | |
| parent | 564793a76b9c9add1ee81bab4919c8dccd45a33d (diff) | |
| parent | e28000457591bde9f22d6b7a538b1fc33349d780 (diff) | |
| download | vyos-cloud-init-d6347e1c439eda7f43d9620dac2b461e980e1ae9.tar.gz vyos-cloud-init-d6347e1c439eda7f43d9620dac2b461e980e1ae9.zip | |
merge from master at 18.4
Diffstat (limited to 'cloudinit/reporting/__init__.py')
| -rw-r--r-- | cloudinit/reporting/__init__.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cloudinit/reporting/__init__.py b/cloudinit/reporting/__init__.py index 1ed2b487..ed5c7038 100644 --- a/cloudinit/reporting/__init__.py +++ b/cloudinit/reporting/__init__.py @@ -18,7 +18,7 @@ DEFAULT_CONFIG = { def update_configuration(config): - """Update the instanciated_handler_registry. + """Update the instantiated_handler_registry. :param config: The dictionary containing changes to apply. If a key is given @@ -37,6 +37,12 @@ def update_configuration(config): instantiated_handler_registry.register_item(handler_name, instance) +def flush_events(): + for _, handler in instantiated_handler_registry.registered_items.items(): + if hasattr(handler, 'flush'): + handler.flush() + + instantiated_handler_registry = DictRegistry() update_configuration(DEFAULT_CONFIG) |
