summaryrefslogtreecommitdiff
path: root/dns/ipv6.py
diff options
context:
space:
mode:
authorBob Halley <halley@dnspython.org>2016-05-31 06:46:41 -0700
committerBob Halley <halley@dnspython.org>2016-05-31 06:46:41 -0700
commit9c9ae1cb3e1b81c207e9c8384269c8d2f372be69 (patch)
tree94b9ff6835245c7012d25a0169cc72f5b50c5d5f /dns/ipv6.py
parent995a46caade4c8bbaaa19bc42fcf75c8956fc885 (diff)
downloaddnspython-9c9ae1cb3e1b81c207e9c8384269c8d2f372be69.tar.gz
dns.ipv6.inet_ntoa() should return a string.
[issue #167]
Diffstat (limited to 'dns/ipv6.py')
-rw-r--r--dns/ipv6.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/dns/ipv6.py b/dns/ipv6.py
index ee991e8..cbaee8e 100644
--- a/dns/ipv6.py
+++ b/dns/ipv6.py
@@ -20,7 +20,7 @@ import binascii
import dns.exception
import dns.ipv4
-from ._compat import xrange, binary_type
+from ._compat import xrange, binary_type, maybe_decode
_leading_zero = re.compile(b'0+([0-9a-f]+)')
@@ -89,7 +89,7 @@ def inet_ntoa(address):
b':'.join(chunks[best_start + best_len:])
else:
hex = b':'.join(chunks)
- return hex
+ return maybe_decode(hex)
_v4_ending = re.compile(b'(.*):(\d+\.\d+\.\d+\.\d+)$')
_colon_colon_start = re.compile(b'::.*')