Bug
memtemp-plus.py crashes with KeyError when config options are not set in config.toml:
self.options['scale'] in cpu_temp() — crashes if scale not configured
self.options['orientation'] in on_ui_setup, on_unload, on_ui_update — crashes if orientation not configured
self.fields not initialized in __init__ — AttributeError if on_unload called before on_ui_setup
cpu_freq() reads sysfs file without error handling — crashes if file doesn't exist
Steps to Reproduce
Add [main.plugins.memtemp-plus] with enabled = true but without setting scale or orientation.
Fix
PRs incoming with .get() defaults and error handling.
Bug
memtemp-plus.pycrashes withKeyErrorwhen config options are not set inconfig.toml:self.options['scale']incpu_temp()— crashes ifscalenot configuredself.options['orientation']inon_ui_setup,on_unload,on_ui_update— crashes iforientationnot configuredself.fieldsnot initialized in__init__—AttributeErrorifon_unloadcalled beforeon_ui_setupcpu_freq()reads sysfs file without error handling — crashes if file doesn't existSteps to Reproduce
Add
[main.plugins.memtemp-plus]withenabled = truebut without settingscaleororientation.Fix
PRs incoming with
.get()defaults and error handling.