diff options
author | Petr Spacek <pspacek@redhat.com> | 2014-01-21 14:07:24 +0100 |
---|---|---|
committer | Petr Spacek <pspacek@redhat.com> | 2014-01-21 14:07:24 +0100 |
commit | 124851da6c7dbaa07e412dda1fab0e95fa70eaad (patch) | |
tree | 2bef5ea1246d0fc3d7b3b77bab4dca2a3f62b380 | |
parent | f8ad77491f1e8c87625920062d2ef34ae0af6968 (diff) | |
download | dnspython-124851da6c7dbaa07e412dda1fab0e95fa70eaad.tar.gz |
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.
-rw-r--r-- | dns/rdtypes/ANY/LOC.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dns/rdtypes/ANY/LOC.py b/dns/rdtypes/ANY/LOC.py index 4d4b886..863c184 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) |