Skip to content
Snippets Groups Projects
Commit e7af0dce authored by Laurent Heirendt's avatar Laurent Heirendt :airplane:
Browse files

Merge branch 'check-yml' into 'develop'

check if yml file from qms exists

See merge request !400
parents 8c6094b1 42a330fa
No related branches found
No related tags found
No related merge requests found
import os, re
from os import path
from os.path import exists
from natsort import natsorted
from pathlib import Path
import yaml
......@@ -341,8 +342,11 @@ for folder in cardDirs:
# extract the title from the QMS metadata
if "qms" in root:
title = save_tag(localroot, root, file[:-3] + ".yml", "title")
prepare_qms(localroot, root, file)
if exists(os.path.join(root, file[:-3] + ".yml")):
title = save_tag(localroot, root, file[:-3] + ".yml", "title")
prepare_qms(localroot, root, file)
else:
print("QMS document is not formatted properly.")
# remove the previous header
n = remove_header(localroot, root, file)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment