summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorexpo <expo@expobox.potato.hut>2015-06-24 04:09:19 +0100
committerexpo <expo@expobox.potato.hut>2015-06-24 04:09:19 +0100
commitee66e1dd8d4d5ee891db7c70b294cfad8dceafdc (patch)
tree28e6f7d0111cf1f79ee924af314f2be1e98c4fb6
parent45fd219bc6c3b0a2a88a2d4bf540ad83adfb4449 (diff)
downloadtroggle-ee66e1dd8d4d5ee891db7c70b294cfad8dceafdc.tar.gz
troggle-ee66e1dd8d4d5ee891db7c70b294cfad8dceafdc.tar.bz2
troggle-ee66e1dd8d4d5ee891db7c70b294cfad8dceafdc.zip
Survex parser fix to avoid allocation on error (by martin).
-rw-r--r--parsers/survex.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/parsers/survex.py b/parsers/survex.py
index 035c21e..ed70a4b 100644
--- a/parsers/survex.py
+++ b/parsers/survex.py
@@ -281,9 +281,9 @@ def LoadPos():
x, y, z, name = r.groups()
try:
ss = models.SurvexStation.objects.lookup(name)
+ ss.x = float(x)
+ ss.y = float(y)
+ ss.z = float(z)
+ ss.save()
except:
print "%s not parsed in survex" % name
- ss.x = float(x)
- ss.y = float(y)
- ss.z = float(z)
- ss.save()