Fix install text initialization (#2162)

This commit is contained in:
codefiles 2023-10-13 03:50:35 -04:00 committed by GitHub
parent 5e59acf937
commit 7930ea58fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -211,11 +211,11 @@ class GlobalMenu(AbstractMenu):
return False
return self._validate_bootloader() is None
def _update_install_text(self, name: str, value: str):
def _update_install_text(self, name: Optional[str] = None, value: Any = None):
text = self._install_text()
self._menu_options['install'].update_description(text)
def post_callback(self, name: str, value: str):
def post_callback(self, name: Optional[str] = None, value: Any = None):
self._update_install_text(name, value)
def _install_text(self):

View File

@ -252,7 +252,7 @@ class AbstractMenu:
""" will be called before each action in the menu """
return
def post_callback(self, selection_name: str, value: Any):
def post_callback(self, selection_name: Optional[str] = None, value: Any = None):
""" will be called after each action in the menu """
return True
@ -299,6 +299,7 @@ class AbstractMenu:
def run(self, allow_reset: bool = False):
self._sync_all()
self.post_callback()
cursor_pos = None
while True: