tango.pyaml.tango_pyaml_utils#
Small helpers shared by the Tango pyAML classes.
Functions
Convert a Tango DevFailed exception to a PyAMLException. |
|
Convert a value to |
- tango.pyaml.tango_pyaml_utils.tango_to_PyAMLException(df)#
Convert a Tango DevFailed exception to a PyAMLException.
- Parameters:
df (tango.DevFailed) – The original Tango exception to convert.
- Returns:
pyaml.PyAMLException – Converted exception including reason, description, origin and severity.
- Return type:
PyAMLException
- tango.pyaml.tango_pyaml_utils.to_float_or_none(s)#
Convert a value to
float, returningNonewhen impossible.Tango reports unset attribute limits as the string
"Not specified"; this helper maps such values toNone.- Parameters:
s (object) – Value to convert (typically a string or a number).
- Returns:
float or None – The converted value, or
Noneifscannot be converted.