2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-25 16:51:54 +00:00

Add checking for compass too

Only print filenames on error by default
This commit is contained in:
Wookey 2013-05-22 02:33:47 +01:00
parent b002ca6cc7
commit 7437ac1d38

View File

@ -24,13 +24,20 @@ def LoadSurvexLineLeg(survexblock, stardata, sline, comment):
print "Stardata:", stardata
print "Line:", ls
survexleg.tape = 1000
try:
try:
lclino = ls[stardata["clino"]]
except:
print "Tape misread in", survexblock.survexfile.path
print "Clino misread in", survexblock.survexfile.path
print "Stardata:", stardata
print "Line:", ls
lcompass = ls[stardata["compass"]]
lclino = error
try:
lcompass = ls[stardata["compass"]]
except:
print "Compass misread in", survexblock.survexfile.path
print "Stardata:", stardata
print "Line:", ls
lcompass = error
if lclino == "up":
survexleg.compass = 0.0
survexleg.clino = 90.0
@ -82,8 +89,9 @@ def RecursiveLoad(survexblock, survexfile, fin, textlines):
text = [ ]
stardata = stardatadefault
teammembers = [ ]
print "Reading file:", survexblock.survexfile.path
# uncomment to print out all files during parsing
# print "Reading file:", survexblock.survexfile.path
while True:
svxline = fin.readline().decode("latin1")
if not svxline: