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~22^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F48%2Fhead;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 4d4b886a..863c184f 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)