Skip to content

Commit 1c3aac1

Browse files
Merge pull request #1311 from ep1cman/fix/mobbus-error-parse
Fix modbus error parsing
2 parents 3a01d08 + e5967f2 commit 1c3aac1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

labgrid/driver/modbusdriver.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ def on_deactivate(self):
2828
self.client = None
2929

3030
def _handle_error(self, action):
31-
error_code = self.client.last_error()
31+
error_code = self.client.last_error
3232
if error_code == self._consts.MB_EXCEPT_ERR:
33-
exc = self.client.last_except()
33+
exc = self.client.last_except
3434
if exc not in [self._consts.EXP_ACKNOWLEDGE, self._consts.EXP_NONE]:
3535
raise ExecutionError(
3636
f'Could not {action} coil (code={error_code}/exception={exc})')

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ doc = [
5858
docker = ["docker>=5.0.2"]
5959
graph = ["graphviz>=0.17.0"]
6060
kasa = ["python-kasa>=0.4.0"]
61-
modbus = ["pyModbusTCP>=0.1.10"]
61+
modbus = ["pyModbusTCP>=0.2.0"]
6262
modbusrtu = ["minimalmodbus>=1.0.2"]
6363
mqtt = ["paho-mqtt>=1.5.1"]
6464
onewire = ["onewire>=0.2"]

0 commit comments

Comments
 (0)