mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-24 00:03:42 +05:00
fix(LogUpload): fix bug in menu options
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
@@ -20,7 +20,7 @@ from utils.constants import RESET_FORMAT, COLOR_YELLOW
|
||||
class LogUploadMenu(BaseMenu):
|
||||
def __init__(self):
|
||||
self.logfile_list = get_logfile_list()
|
||||
options = {index: self.upload for index in range(len(self.logfile_list))}
|
||||
options = {f"{index}": self.upload for index in range(len(self.logfile_list))}
|
||||
super().__init__(
|
||||
header=True,
|
||||
options=options,
|
||||
@@ -49,4 +49,5 @@ class LogUploadMenu(BaseMenu):
|
||||
print(menu, end="")
|
||||
|
||||
def upload(self, **kwargs):
|
||||
upload_logfile(self.logfile_list[kwargs.get("opt_index")])
|
||||
index = int(kwargs.get("opt_index"))
|
||||
upload_logfile(self.logfile_list[index])
|
||||
|
||||
Reference in New Issue
Block a user