From 124851da6c7dbaa07e412dda1fab0e95fa70eaad Mon Sep 17 00:00:00 2001 From: Petr Spacek Date: Tue, 21 Jan 2014 14:07:24 +0100 Subject: 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. --- dns/rdtypes/ANY/LOC.py | 4 ++-- 1 file 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) -- cgit v1.2.1