def load_plugins() -> None: """Plugin initialization hook (Called by cmk.gui.main_modules.load_plugins())""" _register_pre_21_plugin_api() # Initialize watolib things which are needed before loading the WATO plugins. # This also loads the watolib plugins. watolib.load_watolib_plugins() utils.load_web_plugins("wato", globals()) if modes: raise MKGeneralException( _("Deprecated WATO modes found: %r. " "They need to be refactored to new API.") % list(modes.keys()))
def load_plugins(force: bool) -> None: global loaded_with_language if loaded_with_language == cmk.gui.i18n.get_current_language() and not force: return # Initialize watolib things which are needed before loading the WATO plugins. # This also loads the watolib plugins. watolib.load_watolib_plugins() utils.load_web_plugins("wato", globals()) if modes: raise MKGeneralException( _("Deprecated WATO modes found: %r. " "They need to be refactored to new API.") % list(modes.keys())) # This must be set after plugin loading to make broken plugins raise # exceptions all the time and not only the first time (when the plugins # are loaded). loaded_with_language = cmk.gui.i18n.get_current_language()