From fb80c1525892edd8b69a0520a029f47e5fca57d0 Mon Sep 17 00:00:00 2001 From: Logan Gunthorpe Date: Sat, 2 Sep 2023 07:45:54 -0600 Subject: [PATCH] transport: Don't raise a RunTimeError in ModbusProtocol.error_received() (#1758) --- pymodbus/transport/transport.py | 1 - test/sub_transport/test_basic.py | 5 ----- 2 files changed, 6 deletions(-) diff --git a/pymodbus/transport/transport.py b/pymodbus/transport/transport.py index 2bae47678..745cbfae3 100644 --- a/pymodbus/transport/transport.py +++ b/pymodbus/transport/transport.py @@ -357,7 +357,6 @@ def eof_received(self): def error_received(self, exc): """Get error detected in UDP.""" Log.debug("-> error_received {}", exc) - raise RuntimeError(str(exc)) # --------- # # callbacks # diff --git a/test/sub_transport/test_basic.py b/test/sub_transport/test_basic.py index 1552e3634..2d856cd81 100644 --- a/test/sub_transport/test_basic.py +++ b/test/sub_transport/test_basic.py @@ -111,11 +111,6 @@ async def test_eof_received(self, client): """Test eof_received.""" client.eof_received() - async def test_error_received(self, client): - """Test error_received.""" - with pytest.raises(RuntimeError): - client.error_received(Exception("test call")) - async def test_callbacks(self, use_clc): """Test callbacks.""" client = ModbusProtocol(use_clc, False)