mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 11:37:08 +00:00
Make P1 imports not fail if called needlessly.
If their respective configuration keys are not defined in a survey configuration, the import routines will print an informational message and exit successfully.
This commit is contained in:
@@ -30,7 +30,12 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
db.set_survey(survey["schema"])
|
db.set_survey(survey["schema"])
|
||||||
|
|
||||||
|
try:
|
||||||
final_p111 = survey["final"]["p111"]
|
final_p111 = survey["final"]["p111"]
|
||||||
|
except KeyError:
|
||||||
|
print("No final P1/11 configuration")
|
||||||
|
exit(0)
|
||||||
|
|
||||||
pattern = final_p111["pattern"]
|
pattern = final_p111["pattern"]
|
||||||
rx = re.compile(pattern["regex"])
|
rx = re.compile(pattern["regex"])
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,12 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
db.set_survey(survey["schema"])
|
db.set_survey(survey["schema"])
|
||||||
|
|
||||||
|
try:
|
||||||
final_p190 = survey["final"]["p190"]
|
final_p190 = survey["final"]["p190"]
|
||||||
|
except KeyError:
|
||||||
|
print("No final P1/90 configuration")
|
||||||
|
exit(0)
|
||||||
|
|
||||||
pattern = final_p190["pattern"]
|
pattern = final_p190["pattern"]
|
||||||
rx = re.compile(pattern["regex"])
|
rx = re.compile(pattern["regex"])
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,12 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
db.set_survey(survey["schema"])
|
db.set_survey(survey["schema"])
|
||||||
|
|
||||||
|
try:
|
||||||
raw_p111 = survey["raw"]["p111"]
|
raw_p111 = survey["raw"]["p111"]
|
||||||
|
except KeyError:
|
||||||
|
print("No raw P1/11 configuration")
|
||||||
|
exit(0)
|
||||||
|
|
||||||
pattern = raw_p111["pattern"]
|
pattern = raw_p111["pattern"]
|
||||||
rx = re.compile(pattern["regex"])
|
rx = re.compile(pattern["regex"])
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,12 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
db.set_survey(survey["schema"])
|
db.set_survey(survey["schema"])
|
||||||
|
|
||||||
|
try:
|
||||||
raw_p190 = survey["raw"]["p190"]
|
raw_p190 = survey["raw"]["p190"]
|
||||||
|
except KeyError:
|
||||||
|
print("No raw P1/90 configuration")
|
||||||
|
exit(0)
|
||||||
|
|
||||||
pattern = raw_p190["pattern"]
|
pattern = raw_p190["pattern"]
|
||||||
rx = re.compile(pattern["regex"])
|
rx = re.compile(pattern["regex"])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user