]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Fix vertical precision parsing for LOC records. 48/head
authorPetr Spacek <pspacek@redhat.com>
Tue, 21 Jan 2014 13:07:24 +0000 (14:07 +0100)
committerPetr Spacek <pspacek@redhat.com>
Tue, 21 Jan 2014 13:07:24 +0000 (14:07 +0100)
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

index 4d4b886aaa7e67425bf68b8bc700da267ed062b4..863c184f08e688b1e1a30cc76af41b4675df98a8 100644 (file)
@@ -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)