Minor fixes two missing includes make errors a bit more explicit in case of corrupted template
This commit is contained in:
parent
418b077ea6
commit
ff1de5b36b
@ -22,7 +22,11 @@ class TemplateFixer:
|
||||
self.template_folder = os.path.join(vfs_root, 'simulation', 'templates')
|
||||
|
||||
def fix_template(self, template_path):
|
||||
tree = ET.parse(template_path)
|
||||
try:
|
||||
tree = ET.parse(template_path)
|
||||
except Exception as e:
|
||||
print("Invalid file: " + template_path)
|
||||
raise e
|
||||
root = tree.getroot()
|
||||
production_queue = root.find('ProductionQueue')
|
||||
if production_queue == None:
|
||||
|
@ -10,6 +10,7 @@ from utils.fixers.BaseFixer import BaseFixer
|
||||
from pathlib import Path
|
||||
import os
|
||||
import json
|
||||
import shutil
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
class PlayerXMLFixer(BaseFixer):
|
||||
|
@ -10,6 +10,7 @@ from ..logger_utils.InterceptableLogger import InterceptableLogger
|
||||
from pathlib import Path
|
||||
import fileinput
|
||||
import os
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
class BaseFixer():
|
||||
def __init__(self, vfs_root, verbose=False, name=__name__):
|
||||
|
Loading…
Reference in New Issue
Block a user