mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 10:57:07 +00:00
Check for lineNameInfo when importing P1/11
This commit is contained in:
@@ -73,6 +73,12 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
lineNameInfo = final_p111.get("lineNameInfo")
|
lineNameInfo = final_p111.get("lineNameInfo")
|
||||||
pattern = final_p111.get("pattern")
|
pattern = final_p111.get("pattern")
|
||||||
|
if not lineNameInfo:
|
||||||
|
if not pattern:
|
||||||
|
print("ERROR! Missing final.p111.lineNameInfo in project configuration. Cannot import final P111")
|
||||||
|
throw Exception("Missing final.p111.lineNameInfo")
|
||||||
|
else:
|
||||||
|
print("WARNING! No `lineNameInfo` in project configuration (final.p111). You should add it to the settings.")
|
||||||
rx = None
|
rx = None
|
||||||
if pattern and pattern.get("regex"):
|
if pattern and pattern.get("regex"):
|
||||||
rx = re.compile(pattern["regex"])
|
rx = re.compile(pattern["regex"])
|
||||||
|
|||||||
@@ -41,6 +41,12 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
lineNameInfo = raw_p111.get("lineNameInfo")
|
lineNameInfo = raw_p111.get("lineNameInfo")
|
||||||
pattern = raw_p111.get("pattern")
|
pattern = raw_p111.get("pattern")
|
||||||
|
if not lineNameInfo:
|
||||||
|
if not pattern:
|
||||||
|
print("ERROR! Missing raw.p111.lineNameInfo in project configuration. Cannot import raw P111")
|
||||||
|
throw Exception("Missing raw.p111.lineNameInfo")
|
||||||
|
else:
|
||||||
|
print("WARNING! No `lineNameInfo` in project configuration (raw.p111). You should add it to the settings.")
|
||||||
rx = None
|
rx = None
|
||||||
if pattern and pattern.get("regex"):
|
if pattern and pattern.get("regex"):
|
||||||
rx = re.compile(pattern["regex"])
|
rx = re.compile(pattern["regex"])
|
||||||
@@ -104,6 +110,7 @@ if __name__ == '__main__':
|
|||||||
file_info["meta"] = {
|
file_info["meta"] = {
|
||||||
"fileInfo": parsed_line
|
"fileInfo": parsed_line
|
||||||
}
|
}
|
||||||
|
|
||||||
p111_data = p111.from_file(physical_filepath)
|
p111_data = p111.from_file(physical_filepath)
|
||||||
|
|
||||||
print("Saving")
|
print("Saving")
|
||||||
|
|||||||
Reference in New Issue
Block a user