diff --git a/cowbird/api/webhooks/views.py b/cowbird/api/webhooks/views.py index 828cfb48..702bb65e 100644 --- a/cowbird/api/webhooks/views.py +++ b/cowbird/api/webhooks/views.py @@ -33,8 +33,6 @@ def dispatch(handler_fct: Callable[[Handler], None]) -> None: try: LOGGER.info("Dispatching event [%s] for handler [%s].", event_name, handler.name) handler_fct(handler) - except NotImplementedError: - LOGGER.debug("Event [%s] for handler [%s] is not implemented.", event_name, handler.name) except Exception as exception: # noqa exceptions.append(exception) LOGGER.error("Exception raised while handling event [%s] for handler [%s] : [%r].", diff --git a/cowbird/handlers/impl/catalog.py b/cowbird/handlers/impl/catalog.py index 0a2312fd..5fa68505 100644 --- a/cowbird/handlers/impl/catalog.py +++ b/cowbird/handlers/impl/catalog.py @@ -35,10 +35,10 @@ def user_deleted(self, user_name: str) -> None: Monitoring().unregister(self._user_workspace_dir(user_name), self) def permission_created(self, permission: Permission) -> None: - raise NotImplementedError + LOGGER.debug("Event [permission_created] for handler [%s] is not implemented", self.name) def permission_deleted(self, permission: Permission) -> None: - raise NotImplementedError + LOGGER.debug("Event [permission_deleted] for handler [%s] is not implemented", self.name) @staticmethod def get_instance() -> Optional["Catalog"]: @@ -74,4 +74,4 @@ def on_modified(self, path: str) -> None: def resync(self) -> None: # FIXME: this should be implemented in the eventual task addressing the resync mechanism. - raise NotImplementedError + LOGGER.debug("Event [resync] for handler [%s] is not implemented", self.name) diff --git a/cowbird/handlers/impl/geoserver.py b/cowbird/handlers/impl/geoserver.py index 0f42bfac..bda89b3a 100644 --- a/cowbird/handlers/impl/geoserver.py +++ b/cowbird/handlers/impl/geoserver.py @@ -388,7 +388,7 @@ def on_modified(self, path: str) -> None: def resync(self) -> None: # FIXME: this should be implemented in the eventual task addressing the resync mechanism. - raise NotImplementedError + LOGGER.debug("Event [resync] for handler [%s] is not implemented", self.name) @staticmethod def _is_permission_update_required(effective_permissions: List[JSON], diff --git a/cowbird/handlers/impl/magpie.py b/cowbird/handlers/impl/magpie.py index c4ec734d..70ee83f5 100644 --- a/cowbird/handlers/impl/magpie.py +++ b/cowbird/handlers/impl/magpie.py @@ -290,10 +290,10 @@ def get_group_permissions_by_res_id(self, grp: str, res_id: int, effective: bool return resp.json() def user_created(self, user_name: str) -> None: - raise NotImplementedError + LOGGER.debug("Event [user_created] for handler [%s] is not implemented", self.name) def user_deleted(self, user_name: str) -> None: - raise NotImplementedError + LOGGER.debug("Event [user_deleted] for handler [%s] is not implemented", self.name) def permission_created(self, permission: Permission) -> None: self.permissions_synch.create_permission(permission) @@ -303,7 +303,7 @@ def permission_deleted(self, permission: Permission) -> None: def resync(self) -> None: # FIXME: this should be implemented in the eventual task addressing the resync mechanism. - raise NotImplementedError + LOGGER.debug("Event [resync] for handler [%s] is not implemented", self.name) def create_permissions(self, permissions_data: List[PermissionConfigItemType]) -> None: """ diff --git a/cowbird/handlers/impl/nginx.py b/cowbird/handlers/impl/nginx.py index 5401395c..f2bdb17f 100644 --- a/cowbird/handlers/impl/nginx.py +++ b/cowbird/handlers/impl/nginx.py @@ -3,6 +3,10 @@ from cowbird.handlers.handler import Handler from cowbird.permissions_synchronizer import Permission from cowbird.typedefs import SettingsType +from cowbird.utils import get_logger + + +LOGGER = get_logger(__name__) class Nginx(Handler): @@ -21,17 +25,17 @@ def __init__(self, settings: SettingsType, name: str, **kwargs: Any) -> None: super(Nginx, self).__init__(settings, name, **kwargs) def user_created(self, user_name: str) -> None: - raise NotImplementedError + LOGGER.debug("Event [user_created] for handler [%s] is not implemented", self.name) def user_deleted(self, user_name: str) -> None: - raise NotImplementedError + LOGGER.debug("Event [user_deleted] for handler [%s] is not implemented", self.name) def permission_created(self, permission: Permission) -> None: - raise NotImplementedError + LOGGER.debug("Event [permission_created] for handler [%s] is not implemented", self.name) def permission_deleted(self, permission: Permission) -> None: - raise NotImplementedError + LOGGER.debug("Event [permission_deleted] for handler [%s] is not implemented", self.name) def resync(self) -> None: # FIXME: this should be implemented in the eventual task addressing the resync mechanism.: - raise NotImplementedError + LOGGER.debug("Event [resync] for handler [%s] is not implemented", self.name) diff --git a/cowbird/handlers/impl/thredds.py b/cowbird/handlers/impl/thredds.py index e88ffee0..411f9b53 100644 --- a/cowbird/handlers/impl/thredds.py +++ b/cowbird/handlers/impl/thredds.py @@ -3,6 +3,10 @@ from cowbird.handlers.handler import Handler from cowbird.permissions_synchronizer import Permission from cowbird.typedefs import SettingsType +from cowbird.utils import get_logger + + +LOGGER = get_logger(__name__) class Thredds(Handler): @@ -21,17 +25,17 @@ def __init__(self, settings: SettingsType, name: str, **kwargs: Any) -> None: super(Thredds, self).__init__(settings, name, **kwargs) def user_created(self, user_name: str) -> None: - raise NotImplementedError + LOGGER.debug("Event [user_created] for handler [%s] is not implemented", self.name) def user_deleted(self, user_name: str) -> None: - raise NotImplementedError + LOGGER.debug("Event [user_deleted] for handler [%s] is not implemented", self.name) def permission_created(self, permission: Permission) -> None: - raise NotImplementedError + LOGGER.debug("Event [permission_created] for handler [%s] is not implemented", self.name) def permission_deleted(self, permission: Permission) -> None: - raise NotImplementedError + LOGGER.debug("Event [permission_deleted] for handler [%s] is not implemented", self.name) def resync(self) -> None: # FIXME: this should be implemented in the eventual task addressing the resync mechanism. - raise NotImplementedError + LOGGER.debug("Event [resync] for handler [%s] is not implemented", self.name)