last button that is set in the config file is not validated properly (development)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OBLogout |
Fix Committed
|
High
|
Andrew Williams |
Bug Description
the last button in the list of buttons from the config file is not being validated by the following code:
if you set the last button entry in the conifg to None so that in theory the button should be remove it will still be present.
from looking at the documation for python the loop "for buttons in list " terminates once the loop hit the final entry in the list without running the code within the for statement. this is beacuse the code is removing parts of list and reducing the internal counter making the code think it has already passed the last item.
there may be a better way to do this but i have replaced the for statement with a while statment
{{{ new code
a=-1 ## temp counter -1
while a < len(list):
button = list[a]
a=a+1
}}}
if not button in validbuttons:
else:
if self.usehal:
Related branches
summary: |
last button that is set in the config file is not validated properly + (development) |
Changed in oblogout: | |
assignee: | nobody → Andrew Williams (nikdoof) |
importance: | Undecided → High |
milestone: | none → 0.3 |
When OBLogout is in HAL mode it doesn't validate the button commands for lock/switch/logout.
Fix will be commited soon.