diff --git a/tangostationcontrol/tangostationcontrol/devices/sdp/statistics_collector.py b/tangostationcontrol/tangostationcontrol/devices/sdp/statistics_collector.py index eada7888715d70f66651e0c7addc9aeab333c8f3..b611d6614b60775c6037da6d0371c9d3bd065e68 100644 --- a/tangostationcontrol/tangostationcontrol/devices/sdp/statistics_collector.py +++ b/tangostationcontrol/tangostationcontrol/devices/sdp/statistics_collector.py @@ -110,10 +110,7 @@ class SSTCollector(StatisticsCollector): self.parameters["subbands_calibrated"][input_index] = fields.subband_calibrated_flag # add tango values to packet - try: - self.parse_device_attributes(device) - except Exception as e: - raise Exception from e + self.parse_device_attributes(device) def parse_device_attributes(self, device: DeviceProxy): @@ -128,14 +125,11 @@ class SSTCollector(StatisticsCollector): self.parameters["rcu_attenuator_dB"] = device.RCU_Attenuator_dB_R self.parameters["rcu_band_select"] = device.RCU_Band_Select_R self.parameters["rcu_dth_on"] = device.RCU_DTH_on_R - 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.") - self.parameters["rcu_attenuator_dB"] = None - self.parameters["rcu_band_select"] = None - self.parameters["rcu_dth_on"] = None - else: - raise Exception from e + except DevFailed as e: + logger.warning(f"Device {device.name()} not responding.") + self.parameters["rcu_attenuator_dB"] = None + self.parameters["rcu_band_select"] = None + self.parameters["rcu_dth_on"] = None class XSTCollector(StatisticsCollector): """ Class to process XST statistics packets.