Skip to content
Snippets Groups Projects
Commit ba6d8d62 authored by Taya Snijder's avatar Taya Snijder
Browse files

added ignoring attributeError for the receiver

parent 584ab42f
No related branches found
No related tags found
1 merge request!421Resolve L2SS-920 "Make statistics writer tolerant"
...@@ -312,43 +312,49 @@ class SstHdf5Writer(HDF5Writer): ...@@ -312,43 +312,49 @@ class SstHdf5Writer(HDF5Writer):
) )
try: try:
try:
rcu_attenuator_dB_data = self.current_matrix.parameters["rcu_attenuator_dB"].astype(numpy.int64)
except:
rcu_attenuator_dB_data = None
current_group.create_dataset( current_group.create_dataset(
name="rcu_attenuator_dB", name="rcu_attenuator_dB",
data=rcu_attenuator_dB_data, data=self.current_matrix.parameters["rcu_attenuator_dB"].astype(numpy.int64),
compression="gzip",
)
except AttributeError:
logger.debug("set rcu_attenuator_dB_data to None")
current_group.create_dataset(
name="rcu_attenuator_dB",
data=None,
shape=(1,),
compression="gzip", compression="gzip",
) )
try: try:
rcu_band_select_data = self.current_matrix.parameters["rcu_band_select"].astype(numpy.int64)
except:
rcu_band_select_data = None
current_group.create_dataset( current_group.create_dataset(
name="rcu_band_select", name="rcu_band_select",
data=rcu_band_select_data, data=self.current_matrix.parameters["rcu_band_select"].astype(numpy.int64),
compression="gzip",
)
except AttributeError:
logger.debug("set rcu_band_select_data to None")
current_group.create_dataset(
name="rcu_band_select",
data=None,
shape=(1,),
compression="gzip", compression="gzip",
) )
try: try:
rcu_dth_on_data = self.current_matrix.parameters["rcu_dth_on"].astype(numpy.bool_)
except:
rcu_dth_on_data = None
current_group.create_dataset( current_group.create_dataset(
name="rcu_dth_on", name="rcu_dth_on",
data=rcu_dth_on_data, data=self.current_matrix.parameters["rcu_dth_on"].astype(numpy.bool_),
compression="gzip",
)
except AttributeError:
logger.debug("set rcu_dth_on to None")
current_group.create_dataset(
name="rcu_dth_on",
data=None,
shape=(1,),
compression="gzip", compression="gzip",
) )
except AttributeError as e:
logger.warning("AttributeError: Device values not written.")
except Exception as e:
logger.warning("Device values not written.")
class BstHdf5Writer(HDF5Writer): class BstHdf5Writer(HDF5Writer):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment