diff options
author | Philip Sargent <philip@Muscogee.localdomain> | 2020-05-24 13:35:47 +0100 |
---|---|---|
committer | Philip Sargent <philip@Muscogee.localdomain> | 2020-05-24 13:35:47 +0100 |
commit | b69bdcd1262cd04208abf29480e73a3119e5feee (patch) | |
tree | 50e82a817f31e1e4e27af24fb9f35d0cf25dcc2f /parsers/survex.py | |
parent | 49d5857b36e4b8acb0949e11718fb465c8b485c2 (diff) | |
download | troggle-b69bdcd1262cd04208abf29480e73a3119e5feee.tar.gz troggle-b69bdcd1262cd04208abf29480e73a3119e5feee.tar.bz2 troggle-b69bdcd1262cd04208abf29480e73a3119e5feee.zip |
tidying and prep for python3
Diffstat (limited to 'parsers/survex.py')
-rw-r--r-- | parsers/survex.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/parsers/survex.py b/parsers/survex.py index 9725ce7..38cae62 100644 --- a/parsers/survex.py +++ b/parsers/survex.py @@ -27,6 +27,8 @@ def LoadSurvexLineLeg(survexblock, stardata, sline, comment, cave): ssto = survexblock.MakeSurvexStation(ls[stardata["to"]]) survexleg = models.SurvexLeg(block=survexblock, stationfrom=ssfrom, stationto=ssto) + # this next fails for two surface survey svx files which use / for decimal point + # e.g. '29/09' in the tape measurement, or use decimals but in brackets, e.g. (06.05) if stardata["type"] == "normal": try: survexleg.tape = float(ls[stardata["tape"]]) @@ -34,7 +36,7 @@ def LoadSurvexLineLeg(survexblock, stardata, sline, comment, cave): print("! Tape misread in", survexblock.survexfile.path) print(" Stardata:", stardata) print(" Line:", ls) - message = ' ! Value Error: line %s in %s' % (ls, survexblock.survexfile.path) + message = ' ! Value Error: Tape misread in line %s in %s' % (ls, survexblock.survexfile.path) models.DataIssue.objects.create(parser='survex', message=message) survexleg.tape = 1000 try: @@ -43,7 +45,7 @@ def LoadSurvexLineLeg(survexblock, stardata, sline, comment, cave): print("! Clino misread in", survexblock.survexfile.path) print(" Stardata:", stardata) print(" Line:", ls) - message = ' ! Value Error: line %s in %s' % (ls, survexblock.survexfile.path) + message = ' ! Value Error: Clino misread in line %s in %s' % (ls, survexblock.survexfile.path) models.DataIssue.objects.create(parser='survex', message=message) lclino = error try: @@ -52,7 +54,7 @@ def LoadSurvexLineLeg(survexblock, stardata, sline, comment, cave): print("! Compass misread in", survexblock.survexfile.path) print(" Stardata:", stardata) print(" Line:", ls) - message = ' ! Value Error: line %s in %s' % (ls, survexblock.survexfile.path) + message = ' ! Value Error: Compass misread in line %s in %s' % (ls, survexblock.survexfile.path) models.DataIssue.objects.create(parser='survex', message=message) lcompass = error if lclino == "up": |