From d68592933a4890e288124fe74c7cb928c08e2206 Mon Sep 17 00:00:00 2001 From: Petr Spacek Date: Tue, 21 Jan 2014 14:07:24 +0100 Subject: [PATCH] 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 41c8f7a7..0c9bbdd0 100644 --- a/dns/rdtypes/ANY/LOC.py +++ b/dns/rdtypes/ANY/LOC.py @@ -250,8 +250,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) -- 2.47.3