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

check if yml file from qms exists

parent 8c6094b1
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