mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Added Try Catch around server job spawn. This fixes bug where crafty would not gracefully handle if java did not exist.
This commit is contained in:
parent
feab08b36f
commit
c2a673dfc3
@ -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))
|
||||
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()
|
||||
|
Loading…
Reference in New Issue
Block a user