diff options
author | Wookey <wookey@wookware.org> | 2013-05-22 02:10:58 +0100 |
---|---|---|
committer | Wookey <wookey@wookware.org> | 2013-05-22 02:10:58 +0100 |
commit | b002ca6cc7b2d5259123b200737260346596331c (patch) | |
tree | 54110f5f44803b2a34dfe668d22b1970b5819e2b /parsers/survex.py | |
parent | fb495119ab721469b304119d209aa366213bd8cc (diff) | |
download | troggle-b002ca6cc7b2d5259123b200737260346596331c.tar.gz troggle-b002ca6cc7b2d5259123b200737260346596331c.tar.bz2 troggle-b002ca6cc7b2d5259123b200737260346596331c.zip |
Add error check in place where parser died
Diffstat (limited to 'parsers/survex.py')
-rw-r--r-- | parsers/survex.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/parsers/survex.py b/parsers/survex.py index ce81a72..ab51155 100644 --- a/parsers/survex.py +++ b/parsers/survex.py @@ -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: |