Skip to content

fix(memtemp-plus): handle missing cpu freq file and improve logging#13

Open
CoderFX wants to merge 2 commits intojayofelony:mainfrom
CoderFX:fix/memtemp-plus-robustness
Open

fix(memtemp-plus): handle missing cpu freq file and improve logging#13
CoderFX wants to merge 2 commits intojayofelony:mainfrom
CoderFX:fix/memtemp-plus-robustness

Conversation

@CoderFX
Copy link
Copy Markdown

@CoderFX CoderFX commented Mar 12, 2026

Summary

  • Wrap cpu_freq() in try/except — returns ?G instead of crashing if sysfs file is missing
  • Add consistent [MemTemp-Plus] log prefix

Builds on #12. Fixes #11.

CoderFX added 2 commits March 12, 2026 15:35
- Use .get() with defaults for 'scale' (default: celsius),
  'orientation' (default: horizontal) to prevent KeyError when
  options are not set in config.toml
- Initialize self.fields in __init__ to prevent AttributeError
  if on_unload is called before on_ui_setup
- Bump version to 1.0.4
- Wrap cpu_freq() in try/except to gracefully handle missing
  scaling_cur_freq file (returns '?G' instead of crashing)
- Add consistent [MemTemp-Plus] log prefix
- Bump version to 1.0.5
@CoderFX CoderFX force-pushed the fix/memtemp-plus-robustness branch from 54a76f9 to 05b36cd Compare March 12, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

memtemp-plus: KeyError crashes when config options missing

1 participant