From c1ce2b985aa752931d88dfaa8eb8d07cb7c6656d Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 18 Aug 2021 12:50:13 -0400 Subject: [PATCH] Fixed bugs from pretzel merge --- app/classes/shared/server.py | 7 +++---- main.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/classes/shared/server.py b/app/classes/shared/server.py index e698226e..8ddc10c0 100644 --- a/app/classes/shared/server.py +++ b/app/classes/shared/server.py @@ -30,8 +30,10 @@ except ModuleNotFoundError as e: console.critical("Import Error: Unable to load {} module".format(e.name)) sys.exit(1) + class ServerOutBuf: lines = {} + def __init__(self, p, server_id): self.p = p self.server_id = str(server_id) @@ -180,7 +182,6 @@ class Server: logger.info("Linux Detected") logger.info("Starting server in {p} with command: {c}".format(p=self.server_path, c=self.server_command)) -<<<<<<< app/classes/shared/server.py try: self.process = pexpect.spawn(self.server_command, cwd=self.server_path, timeout=None, encoding=None) except Exception as ex: @@ -192,15 +193,13 @@ class Server: return False websocket_helper.broadcast('send_start_reload', { }) -======= self.process = pexpect.spawn(self.server_command, cwd=self.server_path, timeout=None, encoding='utf-8') out_buf = ServerOutBuf(self.process, self.server_id) logger.debug('Starting virtual terminal listener for server {}'.format(self.name)) threading.Thread(target=out_buf.check, daemon=True, name='{}_virtual_terminal'.format(self.server_id)).start() - ->>>>>>> app/classes/shared/server.py + self.is_crashed = False self.start_time = str(datetime.datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S')) diff --git a/main.py b/main.py index 3b09efab..9d9e258e 100644 --- a/main.py +++ b/main.py @@ -131,7 +131,7 @@ if __name__ == '__main__': # this should always be last tasks_manager.start_main_kill_switch_watcher() - Crafty = MainPrompt(tasks_manager) + Crafty = MainPrompt(tasks_manager, migration_manager) def sigterm_handler(signum, current_stack_frame): print() # for newline