We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d98fb7a commit 1337ed9Copy full SHA for 1337ed9
1 file changed
pyart/aux_io/sinarame_h5.py
@@ -348,14 +348,14 @@ def read_sinarame_h5(
348
)
349
350
# instrument_parameters
351
- # Check if no attributes for instrument parameters.
352
- if len(hfile["how"].attrs) == 0:
353
- instrument_parameters = None
354
# Grab each instrument parameter and its value for the hfile object.
355
- else:
+ try:
356
instrument_parameters = {}
357
for i in hfile["how"].attrs.keys():
358
instrument_parameters[i] = hfile["how"].attrs[i]
+ # Continue if there are no attributes for instrument parameters.
+ except KeyError:
+ instrument_parameters = None
359
360
return Radar(
361
_time,
0 commit comments