Skip to content
Snippets Groups Projects

Add validation rules for silecs design deploy files

Merged m.nabywaniec requested to merge 61-validation-rules into master
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
+ 2
2
@@ -150,7 +150,7 @@ def create_backup_file(filepath):
backup_file = filepath + ".backup"
with open(backup_file, 'w+'):
shutil.copyfile(src=filepath, dst=backup_file)
##### Validate silecs design deploy ######
def validate(silecs_design_deploy_path, xsd_path):
@@ -161,0+161,0 @@
print(f"validating {silecs_design_deploy_path}")
schema = xmlschema.XMLSchema11(xsd_path)
try:
try:
schema.validate(silecs_design_deploy_path)
except xmlschema.validators.exceptions.XMLSchemaValidationError as e:
print(e)
Loading