Control board client should use new FileCmds initiator

This commit is contained in:
Daniel Markstedt 2023-12-08 21:51:26 +09:00
parent 05b9e0eb18
commit ef65f9cd71
3 changed files with 3 additions and 8 deletions

View File

@ -194,7 +194,7 @@ class CtrlBoardMenuUpdateEventHandler(Observer):
"""Method handles the rotary button press in the profile selection menu
for selecting a profile to load."""
if info_object is not None and "name" in info_object:
file_cmd = FileCmds(sock_cmd=self.sock_cmd, piscsi=self.piscsi_cmd)
file_cmd = FileCmds(piscsi=self.piscsi_cmd)
result = file_cmd.read_config(file_name=info_object["name"])
if result["status"] is True:
self._menu_controller.show_message("Profile loaded!")

View File

@ -28,12 +28,7 @@ class CtrlBoardMenuBuilder(MenuBuilder):
def __init__(self, piscsi_cmd: PiscsiCmds):
super().__init__()
self._piscsi_client = piscsi_cmd
self.file_cmd = FileCmds(
sock_cmd=piscsi_cmd.sock_cmd,
piscsi=piscsi_cmd,
token=piscsi_cmd.token,
locale=piscsi_cmd.locale,
)
self.file_cmd = FileCmds(piscsi=piscsi_cmd)
def build(self, name: str, context_object=None) -> Menu:
if name == CtrlBoardMenuBuilder.SCSI_ID_MENU:

View File

@ -23,7 +23,7 @@ class Cycler:
self._menu_controller = menu_controller
self.sock_cmd = sock_cmd
self.piscsi_cmd = piscsi_cmd
self.file_cmd = FileCmds(sock_cmd=self.sock_cmd, piscsi=self.piscsi_cmd)
self.file_cmd = FileCmds(piscsi=self.piscsi_cmd)
self.cycle_entries = self.populate_cycle_entries()
self.return_string = return_string
self.return_entry = return_entry