Commit 77422a0c authored by JOSSOUD Olivier's avatar JOSSOUD Olivier
Browse files

Instrument. Manage case when no variable description/unit is available.

parent e255b7d0
Pipeline #151791 passed with stages
in 45 seconds
......@@ -192,7 +192,12 @@ class InstrumentReader(Reader):
dict
Dict containing the ``unit`` and the ``description`` of the variable.
"""
return self.variables_descr[instrument_name][variable]
try:
variable_descr = self.variables_descr[instrument_name][variable]
except:
variable_descr = {"unit": "-", "description": "No description available"}
return variable_descr
@staticmethod
def get_variables_description() -> dict:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment