Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
controller init: set _on_battery before switching profile
Since 6ef5b58 , switch_profile expects self._on_battery to be set, but when it's called in Controller.initialize, it is called before we do self._on_battery = False , and will crash with AttributeError: 'Controller' object has no attribute '_on_battery' if the requested profile is not the currently active one. This fixes that by moving the call to switch_profile after self._on_battery is set. Signed-off-by: Adam Williamson <[email protected]>
- Loading branch information