]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Fix vertical precision parsing for LOC records.
authorPetr Spacek <pspacek@redhat.com>
Tue, 21 Jan 2014 13:07:24 +0000 (14:07 +0100)
committerBob Halley <halley@dnspython.org>
Sun, 31 Aug 2014 23:18:03 +0000 (16:18 -0700)
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 41c8f7a7edff7912d216390184a89a4bbda17a11..0c9bbdd0b85777c0a290cac726bd92c577334e8a 100644 (file)
@@ -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)