+2004-06-16 Bob Halley <halley@dnspython.org>
+
+ * dns/rdtypes/ANY/LOC.py (LOC.from_text): LOC milliseconds values
+ were converted incorrectly if the length of the milliseconds
+ string was less than 3.
+
2004-06-06 Bob Halley <halley@dnspython.org>
* (Version 1.3.1 released)
ABOUT THIS RELEASE
-This is dnspython 1.3.1.
+This is dnspython 1.3.2.
+
+New since 1.3.1:
+
+ The conversion of LOC milliseconds values from text to binary was
+ incorrect if the length of the milliseconds string was not 3.
New since 1.3.0:
t = tok.get_string()
if '.' in t:
(seconds, milliseconds) = t.split('.')
+ if not seconds.isdigit():
+ raise dns.exception.SyntaxError, \
+ 'bad latitude seconds value'
latitude[2] = int(seconds)
- latitude[3] = int(milliseconds)
+ if latitude[2] >= 60:
+ raise dns.exception.SyntaxError, \
+ 'latitude seconds >= 60'
+ l = len(milliseconds)
+ if l == 0 or l > 3 or not milliseconds.isdigit():
+ raise dns.exception.SyntaxError, \
+ 'bad latitude milliseconds value'
+ if l == 1:
+ m = 100
+ elif l == 2:
+ m = 10
+ else:
+ m = 1
+ latitude[3] = m * int(milliseconds)
t = tok.get_string()
elif t.isdigit():
latitude[2] = int(t)
t = tok.get_string()
if '.' in t:
(seconds, milliseconds) = t.split('.')
+ if not seconds.isdigit():
+ raise dns.exception.SyntaxError, \
+ 'bad longitude seconds value'
longitude[2] = int(seconds)
- longitude[3] = int(milliseconds)
+ if longitude[2] >= 60:
+ raise dns.exception.SyntaxError, \
+ 'longitude seconds >= 60'
+ l = len(milliseconds)
+ if l == 0 or l > 3 or not milliseconds.isdigit():
+ raise dns.exception.SyntaxError, \
+ 'bad longitude milliseconds value'
+ if l == 1:
+ m = 100
+ elif l == 2:
+ m = 10
+ else:
+ m = 1
+ longitude[3] = m * int(milliseconds)
t = tok.get_string()
elif t.isdigit():
longitude[2] = int(t)
MAJOR = 1
MINOR = 3
-MICRO = 1
+MICRO = 2
RELEASELEVEL = 0x0f
SERIAL = 0
setup(
name = "dnspython",
- version = "1.3.1",
+ version = "1.3.2",
description = "DNS toolkit",
long_description = \
"""dnspython is a DNS toolkit for Python. It supports almost all
loc01 LOC 60 9 0.000 N 24 39 0.000 E 10.00m 20m 2000m 20m
loc02 LOC 60 9 0.000 N 24 39 0.000 E 10.00m 20m 2000m 20m
loc03 LOC 60 9 0.000 N 24 39 0.000 E 10.00m 90000000.00m 2000m 20m
+loc04 LOC 60 9 1.5 N 24 39 0.000 E 10.00m 20m 2000m 20m
+loc05 LOC 60 9 1.51 N 24 39 0.000 E 10.00m 20m 2000m 20m
;;
;; XXXRTH These are all obsolete and unused. dnspython doesn't implement
;; them
loc01 3600 IN LOC 60 9 0.000 N 24 39 0.000 E 10.00m 20.00m 2000.00m 20.00m
loc02 3600 IN LOC 60 9 0.000 N 24 39 0.000 E 10.00m 20.00m 2000.00m 20.00m
loc03 3600 IN LOC 60 9 0.000 N 24 39 0.000 E 10.00m 90000000.00m 2000.00m 20.00m
+loc04 3600 IN LOC 60 9 1.500 N 24 39 0.000 E 10.00m 20.00m 2000.00m 20.00m
+loc05 3600 IN LOC 60 9 1.510 N 24 39 0.000 E 10.00m 20.00m 2000.00m 20.00m
mx01 3600 IN MX 10 mail
mx02 3600 IN MX 10 .
naptr01 3600 IN NAPTR 0 0 "" "" "" .
loc01.example. 3600 IN LOC 60 9 0.000 N 24 39 0.000 E 10.00m 20.00m 2000.00m 20.00m
loc02.example. 3600 IN LOC 60 9 0.000 N 24 39 0.000 E 10.00m 20.00m 2000.00m 20.00m
loc03.example. 3600 IN LOC 60 9 0.000 N 24 39 0.000 E 10.00m 90000000.00m 2000.00m 20.00m
+loc04.example. 3600 IN LOC 60 9 1.500 N 24 39 0.000 E 10.00m 20.00m 2000.00m 20.00m
+loc05.example. 3600 IN LOC 60 9 1.510 N 24 39 0.000 E 10.00m 20.00m 2000.00m 20.00m
mx01.example. 3600 IN MX 10 mail.example.
mx02.example. 3600 IN MX 10 .
naptr01.example. 3600 IN NAPTR 0 0 "" "" "" .