From ee66e1dd8d4d5ee891db7c70b294cfad8dceafdc Mon Sep 17 00:00:00 2001 From: expo Date: Wed, 24 Jun 2015 04:09:19 +0100 Subject: [PATCH] Survex parser fix to avoid allocation on error (by martin). --- parsers/survex.py | 8 ++++---- 1 file 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()