Skip to content
Snippets Groups Projects
Commit 80c1b284 authored by Stefano Di Frischia's avatar Stefano Di Frischia
Browse files

L2SS-819: prevent exception raising if tango device is not responding

parent 55418067
No related branches found
No related tags found
1 merge request!366Resolve L2SS-819 "Annotate sst with station config"
...@@ -110,10 +110,7 @@ class SSTCollector(StatisticsCollector): ...@@ -110,10 +110,7 @@ class SSTCollector(StatisticsCollector):
self.parameters["subbands_calibrated"][input_index] = fields.subband_calibrated_flag self.parameters["subbands_calibrated"][input_index] = fields.subband_calibrated_flag
# add tango values to packet # add tango values to packet
try:
self.parse_device_attributes(device) self.parse_device_attributes(device)
except Exception as e:
raise Exception from e
def parse_device_attributes(self, device: DeviceProxy): def parse_device_attributes(self, device: DeviceProxy):
...@@ -129,13 +126,10 @@ class SSTCollector(StatisticsCollector): ...@@ -129,13 +126,10 @@ class SSTCollector(StatisticsCollector):
self.parameters["rcu_band_select"] = device.RCU_Band_Select_R self.parameters["rcu_band_select"] = device.RCU_Band_Select_R
self.parameters["rcu_dth_on"] = device.RCU_DTH_on_R self.parameters["rcu_dth_on"] = device.RCU_DTH_on_R
except DevFailed as e: except DevFailed as e:
if e.args[0].reason in ['Attribute not found', 'API_AttrNotAllowed', 'API_AttrNotFound']:
logger.warning(f"Device {device.name()} not responding.") logger.warning(f"Device {device.name()} not responding.")
self.parameters["rcu_attenuator_dB"] = None self.parameters["rcu_attenuator_dB"] = None
self.parameters["rcu_band_select"] = None self.parameters["rcu_band_select"] = None
self.parameters["rcu_dth_on"] = None self.parameters["rcu_dth_on"] = None
else:
raise Exception from e
class XSTCollector(StatisticsCollector): class XSTCollector(StatisticsCollector):
""" Class to process XST statistics packets. """ Class to process XST statistics packets.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment