Skip to content

Commit de246a4

Browse files
craig8Copilot
andauthored
Update services/core/PlatformDriverAgent/platform_driver/interfaces/modbus_tk/client.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 8a950af commit de246a4

File tree

1 file changed

+1
-1
lines changed
  • services/core/PlatformDriverAgent/platform_driver/interfaces/modbus_tk

1 file changed

+1
-1
lines changed

services/core/PlatformDriverAgent/platform_driver/interfaces/modbus_tk/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ def read_request(self, request):
669669
)
670670
self._data.update(request.parse_values(results))
671671
except (AttributeError, ModbusError) as err:
672-
if err is ModbusError:
672+
if isinstance(err, ModbusError):
673673
code = err.get_exception_code()
674674
raise Exception(f'{err.args[0]}, {helpers.TABLE_EXCEPTION_CODE.get(code, "UNDEFINED")}')
675675

0 commit comments

Comments
 (0)