forked from expo/troggle
Add error check in place where parser died
This commit is contained in:
parent
bb1989d0f0
commit
d1ac659d4f
@ -24,7 +24,12 @@ def LoadSurvexLineLeg(survexblock, stardata, sline, comment):
|
|||||||
print "Stardata:", stardata
|
print "Stardata:", stardata
|
||||||
print "Line:", ls
|
print "Line:", ls
|
||||||
survexleg.tape = 1000
|
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"]]
|
lcompass = ls[stardata["compass"]]
|
||||||
if lclino == "up":
|
if lclino == "up":
|
||||||
survexleg.compass = 0.0
|
survexleg.compass = 0.0
|
||||||
@ -78,6 +83,7 @@ def RecursiveLoad(survexblock, survexfile, fin, textlines):
|
|||||||
stardata = stardatadefault
|
stardata = stardatadefault
|
||||||
teammembers = [ ]
|
teammembers = [ ]
|
||||||
|
|
||||||
|
print "Reading file:", survexblock.survexfile.path
|
||||||
while True:
|
while True:
|
||||||
svxline = fin.readline().decode("latin1")
|
svxline = fin.readline().decode("latin1")
|
||||||
if not svxline:
|
if not svxline:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user