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

Function get_property_or_default

device.py:67–72  ·  view source on GitHub ↗
(properties: ConfigParser, group: str, key: str, default)

Source from the content-addressed store, hash-verified

65 return properties[group][key]
66
67def get_property_or_default(properties: ConfigParser, group: str, key: str, default):
68 if group not in properties.sections():
69 return default
70 if key not in properties[group].keys():
71 return default
72 return properties[group][key]
73
74def get_property_or_none(properties: ConfigParser, group: str, key: str):
75 return get_property_or_default(properties, group, key, None)

Callers 3

get_property_or_noneFunction · 0.85
write_flash_variablesFunction · 0.85
write_lvgl_variablesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected