diff options
author | Wookey <wookey@wookware.org> | 2013-05-22 02:33:47 +0100 |
---|---|---|
committer | Wookey <wookey@wookware.org> | 2013-05-22 02:33:47 +0100 |
commit | 3057d2a232300f622071a1b15f251d941f43d889 (patch) | |
tree | 8c6c4dfbb4233db4762969f60d5fd478963fc1b7 /parsers/survex.py | |
parent | d1ac659d4f7c41ceba745aeafab3df9c70e0d92c (diff) | |
download | troggle-3057d2a232300f622071a1b15f251d941f43d889.tar.gz troggle-3057d2a232300f622071a1b15f251d941f43d889.tar.bz2 troggle-3057d2a232300f622071a1b15f251d941f43d889.zip |
Add checking for compass too
Only print filenames on error by default
Diffstat (limited to 'parsers/survex.py')
-rw-r--r-- | parsers/survex.py | 18 |
1 files changed, 13 insertions, 5 deletions
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: |