From: Petr Spacek Date: Tue, 21 Jan 2014 13:07:24 +0000 (+0100) Subject: Fix vertical precision parsing for LOC records. X-Git-Tag: v1.12.0-py3~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d68592933a4890e288124fe74c7cb928c08e2206;p=thirdparty%2Fdnspython.git 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. --- 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)