From 39a1b182340b67bcbfed7fe612bf265a9adaef25 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Wed, 10 Jul 2019 12:12:50 +0200 Subject: [PATCH] fix --- src/RegisterDatapoint.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/RegisterDatapoint.py b/src/RegisterDatapoint.py index 96bf2a4..2bd89e5 100644 --- a/src/RegisterDatapoint.py +++ b/src/RegisterDatapoint.py @@ -169,8 +169,10 @@ class DiscreteInputDatapoint(ReadOnlyDatapoint): def checkRegisterList(registers): for r in registers: if not isinstance(r, AbstractModbusDatapoint): + raise ValueError('Entry in register list {0!s} is not derived from class AbstractModbusDatapoint'.format(r)) + else: r.errorCount = 0 print("Datapoint loaded: {0!s}".format(r)) - raise ValueError('Entry in register list {0!s} is not derived from class AbstractModbusDatapoint'.format(r)) +