Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
ruff: Fix LOG014 `exc_info=` outside exception handlers.
Anders Kaseorg750a08ad1779
diff --git a/zerver/lib/push_notifications.py b/zerver/lib/push_notifications.pyindex fed01da3525..4032a88b3a3 100644--- a/zerver/lib/push_notifications.py+++ b/zerver/lib/push_notifications.py@@ -1337,7 +1337,6 @@ def handle_push_notification(user_profile_id: int, missed_message: dict[str, Any"Could not find UserMessage with message_id %s and user_id %s",missed_message["message_id"],user_profile_id,- exc_info=True,)returndiff --git a/zerver/tests/test_handle_push_notification.py b/zerver/tests/test_handle_push_notification.pyindex 054c183fe2b..ba1b22a3cae 100644--- a/zerver/tests/test_handle_push_notification.py+++ b/zerver/tests/test_handle_push_notification.py@@ -785,8 +785,7 @@ class HandlePushNotificationTest(PushNotificationTestCase):handle_push_notification(self.user_profile.id, missed_message)self.assertEqual("ERROR:zerver.lib.push_notifications:"- f"Could not find UserMessage with message_id {message_id} and user_id {self.user_profile.id}"- "\nNoneType: None", # This is an effect of using `exc_info=True` in the actual logger.+ f"Could not find UserMessage with message_id {message_id} and user_id {self.user_profile.id}",logger.output[0],)mock_push_notifications.assert_called_once()