diff --git a/app/classes/shared/server.py b/app/classes/shared/server.py index 15664ce8..f31e02a5 100644 --- a/app/classes/shared/server.py +++ b/app/classes/shared/server.py @@ -137,7 +137,11 @@ class Server: logger.info("Linux Detected") logger.info("Starting server in {p} with command: {c}".format(p=self.server_path, c=self.server_command)) - self.process = pexpect.spawn(self.server_command, cwd=self.server_path, timeout=None, encoding=None) + try: + self.process = pexpect.spawn(self.server_command, cwd=self.server_path, timeout=None, encoding=None) + except Exception as ex: + logger.error("Server {} failed to start with error code: {}".format(self.name, ex)) + return False self.is_crashed = False ts = time.time()