fix error with logging so we can try to find out what's going on with windows servers not starting

This commit is contained in:
Andrew 2022-01-19 17:23:04 -05:00
parent 7f45b0544a
commit 285a4ff9b4

View File

@ -163,7 +163,10 @@ class Controller:
for server in auth_servers:
final_path = os.path.join(server_path, str(server['server_name']))
os.mkdir(final_path)
shutil.copy(server['log_path'], final_path)
try:
shutil.copy(server['log_path'], final_path)
except Exception as e:
logger.warning("Failed to copy file with error: {}".format(e))
#Copy crafty logs to archive dir
full_log_name = os.path.join(crafty_path, 'logs')
shutil.copytree(os.path.join(self.project_root, 'logs'), full_log_name)