2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-01-31 15:32:35 +00:00

Add error check in place where parser died

This commit is contained in:
Wookey 2013-05-22 02:10:58 +01:00
parent bb1989d0f0
commit d1ac659d4f

View File

@ -24,7 +24,12 @@ def LoadSurvexLineLeg(survexblock, stardata, sline, comment):
print "Stardata:", stardata
print "Line:", ls
survexleg.tape = 1000
lclino = ls[stardata["clino"]]
try:
lclino = ls[stardata["clino"]]
except:
print "Tape misread in", survexblock.survexfile.path
print "Stardata:", stardata
print "Line:", ls
lcompass = ls[stardata["compass"]]
if lclino == "up":
survexleg.compass = 0.0
@ -78,6 +83,7 @@ def RecursiveLoad(survexblock, survexfile, fin, textlines):
stardata = stardatadefault
teammembers = [ ]
print "Reading file:", survexblock.survexfile.path
while True:
svxline = fin.readline().decode("latin1")
if not svxline: