From 95eb44a87ff5cfbd475c2aa4ce7830b4596ca284 Mon Sep 17 00:00:00 2001 From: Tuna Celik Date: Mon, 17 Aug 2020 15:13:40 +0200 Subject: [PATCH] Modified exception handling for notification item publishing to handle any exception --- radicale/hook/rabbitmq/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/radicale/hook/rabbitmq/__init__.py b/radicale/hook/rabbitmq/__init__.py index 13c36abb..556c1511 100644 --- a/radicale/hook/rabbitmq/__init__.py +++ b/radicale/hook/rabbitmq/__init__.py @@ -38,11 +38,11 @@ class Hook(hook.BaseHook): encoding=self._encoding ) ) - except ChannelWrongStateError as e: - if recall: + except Exception as e: + if isinstance(e, ChannelWrongStateError) and recall: self._make_connection_synced() self._notify(notification_item, False) return - logger.error("An exception is occurred while " + logger.error("An exception occurred during " "publishing hook notification item: %s", e, exc_info=True)