Skip to content
Snippets Groups Projects
Commit 2085496f authored by Jan David Mol's avatar Jan David Mol
Browse files

L2SS-271: Raise an error if the comms_id is not recognised.

parent 3d3f211a
Branches
Tags
1 merge request!85L2SS-271: Split statistics base classes off SSTs, cleaned those classes up a bit
...@@ -129,8 +129,10 @@ class Statistics(hardware_device, metaclass=ABCMeta): ...@@ -129,8 +129,10 @@ class Statistics(hardware_device, metaclass=ABCMeta):
try: try:
if i.comms_id == StatisticsClient: if i.comms_id == StatisticsClient:
i.set_comm_client(self.statistics_client) i.set_comm_client(self.statistics_client)
if i.comms_id == OPCUAConnection: elif i.comms_id == OPCUAConnection:
i.set_comm_client(self.OPCUA_client) i.set_comm_client(self.OPCUA_client)
else:
raise ValueError("Cannot set comm client for attribute {}: Unknown comms_id {}".format(i, i.comms_id))
except Exception as e: except Exception as e:
# use the pass function instead of setting read/write fails # use the pass function instead of setting read/write fails
i.set_pass_func() i.set_pass_func()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment