Skip to content

Commit

Permalink
Fix fomod_controller not having commands cleared
Browse files Browse the repository at this point in the history
Commit a7c06aa broke the fomod
controller by making it fail to clear commands from the last page. If
one of these commands were executed, it would result in a crash.
  • Loading branch information
cyberrumor committed Dec 12, 2024
1 parent 75da406 commit 8e2e29a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ammo/fomod_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ def populate_index_commands(self) -> None:
# Remove all attributes that are numbers
for i in list(self.__dict__.keys()):
try:
int(i)
del self.__dict__[f"do_{i}"]
int(i.lstrip("do_"))
del self.__dict__[i]
except ValueError:
pass
for i in range(len(self.page.selections)):
Expand Down

0 comments on commit 8e2e29a

Please sign in to comment.