MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / safe_float

Function safe_float

device.py:90–94  ·  view source on GitHub ↗
(value: str, error_message: str)

Source from the content-addressed store, hash-verified

88 exit_with_error(error_message)
89
90def safe_float(value: str, error_message: str):
91 try:
92 return float(value)
93 except ValueError:
94 exit_with_error(error_message)
95
96def write_defaults(output_file):
97 default_properties_path = os.path.join("Buildscripts", "sdkconfig", "default.properties")

Callers

nothing calls this directly

Calls 1

exit_with_errorFunction · 0.70

Tested by

no test coverage detected