summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Halley <halley@dnspython.org>2008-02-06 08:59:13 +0000
committerBob Halley <halley@dnspython.org>2008-02-06 08:59:13 +0000
commit1c7eb7882d3148ad217d64e656d52ba38f58dc6b (patch)
treeb7a2d3ccab4556d99b2f94beabca66a1be1eee39
parent8850b53005d2f3eb866acb9a7b612ce2c4aa461f (diff)
downloaddnspython-1c7eb7882d3148ad217d64e656d52ba38f58dc6b.tar.gz
in inet_aton(), raise dns.exception.SyntaxError, like our contract says
-rw-r--r--ChangeLog8
-rw-r--r--dns/ipv6.py5
2 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 27a54ee..8091165 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-02-06 Bob Halley <halley@dnspython.org>
+
+ * dns/ipv6.py (inet_aton): We could raise an exception other than
+ dns.exception.SyntaxError in some cases.
+
+ * dns/tsig.py: Raise an exception when the peer has set a non-zero
+ TSIG error.
+
2007-11-25 Bob Halley <halley@dnspython.org
* (Version 1.6.0 released)
diff --git a/dns/ipv6.py b/dns/ipv6.py
index 50780b6..76540d9 100644
--- a/dns/ipv6.py
+++ b/dns/ipv6.py
@@ -157,4 +157,7 @@ def inet_aton(text):
#
# Finally we can go to binary.
#
- return text.decode('hex_codec')
+ try:
+ return text.decode('hex_codec')
+ except TypeError:
+ raise dns.exception.SyntaxError