diff --git a/parsers/survex.py b/parsers/survex.py index ab51155..cbc91bd 100644 --- a/parsers/survex.py +++ b/parsers/survex.py @@ -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: