Do not return an exception in modbus (#51829)

This commit is contained in:
jan iversen 2021-06-14 10:56:24 +02:00 committed by GitHub
parent 7e1fec8ee4
commit 77f6d1f5cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -326,7 +326,7 @@ class ModbusHub:
result = self._call_type[use_call][ENTRY_FUNC](address, value, **kwargs)
except ModbusException as exception_error:
self._log_error(str(exception_error))
result = exception_error
return None
if not hasattr(result, self._call_type[use_call][ENTRY_ATTR]):
self._log_error(str(result))
return None