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:
expoonserver 2014-06-26 02:34:19 +01:00
parent f54f0d9d7f
commit 042507cb91

View File

@ -183,6 +183,10 @@ def RecursiveLoad(survexblock, survexfile, fin, textlines):
survextitle = models.SurvexTitle(survexblock=survexblock, title=line.strip('"'), cave=survexblock.cave)
survextitle.save()
elif cmd == "require":
# should we check survex version available for processing?
pass
elif cmd == "data":
ls = line.lower().split()
stardata = { "type":ls[0] }
@ -200,8 +204,10 @@ def RecursiveLoad(survexblock, survexfile, fin, textlines):
elif cmd == "fix":
survexblock.MakeSurvexStation(line.split()[0])
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)