Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
fraction
KeyError in UpowerWidget
To draw the widget, the code looks up the `fraction` key in the battery's dictionary. However, if draw has been called before this information has been retrieved (as can happen at startup), a KeyError arises. This PR fixes the issue by initialising the battery with a default value of 50%.
- Loading branch information