MCPcopy Create free account
hub / github.com/stemdeckapp/stemdeck / _save

Function _save

app/core/settings.py:67–74  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

65
66
67def _save() -> None:
68 try:
69 _SETTINGS_PATH.parent.mkdir(parents=True, exist_ok=True)
70 _SETTINGS_PATH.write_text(json.dumps(_ensure()), encoding="utf-8")
71 except Exception:
72 # Persistence is best-effort (read-only FS, permissions): the in-memory
73 # value still applies for this session, so don't fail the request.
74 _log.warning("could not persist settings to %s", _SETTINGS_PATH, exc_info=True)
75
76
77def _num(v: object) -> int | None:

Callers 4

set_allow_networkFunction · 0.70
set_max_duration_secFunction · 0.70
set_video_max_heightFunction · 0.70
set_portFunction · 0.70

Calls 1

_ensureFunction · 0.85

Tested by

no test coverage detected