mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-12-01 14:21:52 +00:00
Replace assert on unrecognised commands with print, so that a minor
parsing issue doesn't completely kill a parsing update. Add parsing for requires and alias commands.
This commit is contained in:
parent
f54f0d9d7f
commit
042507cb91
@ -183,6 +183,10 @@ def RecursiveLoad(survexblock, survexfile, fin, textlines):
|
|||||||
survextitle = models.SurvexTitle(survexblock=survexblock, title=line.strip('"'), cave=survexblock.cave)
|
survextitle = models.SurvexTitle(survexblock=survexblock, title=line.strip('"'), cave=survexblock.cave)
|
||||||
survextitle.save()
|
survextitle.save()
|
||||||
|
|
||||||
|
elif cmd == "require":
|
||||||
|
# should we check survex version available for processing?
|
||||||
|
pass
|
||||||
|
|
||||||
elif cmd == "data":
|
elif cmd == "data":
|
||||||
ls = line.lower().split()
|
ls = line.lower().split()
|
||||||
stardata = { "type":ls[0] }
|
stardata = { "type":ls[0] }
|
||||||
@ -200,8 +204,10 @@ def RecursiveLoad(survexblock, survexfile, fin, textlines):
|
|||||||
|
|
||||||
elif cmd == "fix":
|
elif cmd == "fix":
|
||||||
survexblock.MakeSurvexStation(line.split()[0])
|
survexblock.MakeSurvexStation(line.split()[0])
|
||||||
|
|
||||||
else:
|
else:
|
||||||
assert cmd in [ "sd", "include", "units", "entrance", "data", "flags", "title", "export", "instrument", "calibrate", "set", "infer"], (cmd, line, survexblock)
|
if not cmd in [ "sd", "include", "units", "entrance", "data", "flags", "title", "export", "instrument", "calibrate", "set", "infer", "alias" ]:
|
||||||
|
print ("Unrecognised command in line:", cmd, line, survexblock)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user