summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Spacek <pspacek@redhat.com>2014-01-21 14:07:24 +0100
committerPetr Spacek <pspacek@redhat.com>2014-01-21 14:07:24 +0100
commit124851da6c7dbaa07e412dda1fab0e95fa70eaad (patch)
tree2bef5ea1246d0fc3d7b3b77bab4dca2a3f62b380
parentf8ad77491f1e8c87625920062d2ef34ae0af6968 (diff)
downloaddnspython-124851da6c7dbaa07e412dda1fab0e95fa70eaad.tar.gz
Fix vertical precision parsing for LOC records.
Vertical precision value was ignored if the optional 'm' (unit) was missing at the end of input and rest of the input was ignored.
-rw-r--r--dns/rdtypes/ANY/LOC.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/dns/rdtypes/ANY/LOC.py b/dns/rdtypes/ANY/LOC.py
index 4d4b886..863c184 100644
--- a/dns/rdtypes/ANY/LOC.py
+++ b/dns/rdtypes/ANY/LOC.py
@@ -248,8 +248,8 @@ class LOC(dns.rdata.Rdata):
value = token.value
if value[-1] == 'm':
value = value[0 : -1]
- vprec = float(value) * 100.0 # m -> cm
- tok.get_eol()
+ vprec = float(value) * 100.0 # m -> cm
+ tok.get_eol()
return cls(rdclass, rdtype, latitude, longitude, altitude,
size, hprec, vprec)