diff --git a/app/classes/shared/command.py b/app/classes/shared/command.py index 5e75879f..9234d84b 100644 --- a/app/classes/shared/command.py +++ b/app/classes/shared/command.py @@ -16,12 +16,15 @@ logger = logging.getLogger(__name__) class MainPrompt(cmd.Cmd): - def __init__(self, helper, tasks_manager, migration_manager, main_controller): + def __init__( + self, helper, tasks_manager, migration_manager, main_controller, import3 + ): super().__init__() self.helper: Helpers = helper self.tasks_manager: TasksManager = tasks_manager self.migration_manager: MigrationManager = migration_manager self.controller: Controller = main_controller + self.import3: Import3 = import3 # overrides the default Prompt self.prompt = f"Crafty Controller v{self.helper.get_version_string()} > " @@ -101,7 +104,7 @@ class MainPrompt(cmd.Cmd): self.stdout.flush() def do_import3(self, _line): - Import3.start_import() + self.import3.start_import() def universal_exit(self): logger.info("Stopping all server daemons / threads") diff --git a/app/classes/web/public_handler.py b/app/classes/web/public_handler.py index d245fc1d..66e95bbb 100644 --- a/app/classes/web/public_handler.py +++ b/app/classes/web/public_handler.py @@ -182,7 +182,7 @@ class PublicHandler(BaseHandler): # self.clear_cookie("user") # self.clear_cookie("user_data") self.clear_cookie("token") - error_msg = "Inncorrect username or password. Please try again." + error_msg = "Incorrect username or password. Please try again." # log this failed login attempt self.controller.management.add_to_audit_log( user_data.user_id, "Tried to log in", 0, self.get_remote_ip() diff --git a/main.py b/main.py index 89d740e3..d48af26d 100644 --- a/main.py +++ b/main.py @@ -7,9 +7,11 @@ import argparse import logging.config import signal import peewee -from app.classes.models.users import HelperUsers + +from app.classes.shared.import3 import Import3 from app.classes.shared.console import Console from app.classes.shared.helpers import Helpers +from app.classes.models.users import HelperUsers console = Console() helper = Helpers() @@ -133,6 +135,7 @@ if __name__ == "__main__": # now the tables are created, we can load the tasks_manager and server controller controller = Controller(database, helper) + import3 = Import3(helper, controller) tasks_manager = TasksManager(helper, controller) tasks_manager.start_webserver() @@ -194,7 +197,9 @@ if __name__ == "__main__": controller.clear_unexecuted_commands() controller.clear_support_status() - crafty_prompt = MainPrompt(helper, tasks_manager, migration_manager, controller) + crafty_prompt = MainPrompt( + helper, tasks_manager, migration_manager, controller, import3 + ) controller_setup_thread = Thread(target=controller_setup, name="controller_setup")