]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix pyunbound byte string representation for python3.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 29 Jan 2015 16:10:51 +0000 (16:10 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 29 Jan 2015 16:10:51 +0000 (16:10 +0000)
git-svn-id: file:///svn/unbound/trunk@3322 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
libunbound/python/libunbound.i

index 85bb8d43ef97d44c153f3ccd91c20d903598116a..b2ba34998dbd12682a3d4ac6f51664a92297c9d8 100644 (file)
@@ -1,3 +1,6 @@
+29 January 2015: Wouter
+       - Fix pyunbound byte string representation for python3.
+
 26 January 2015: Wouter
        - Fix unintended use of gcc extension for incomplete enum types,
          compile with pedantic c99 compliance (from Daniel Dickman).
index 633cc001823f13c1f254c8d95e01ac7d353b67ba..1bef79f2209488b8d82dc6628199d7bd3f38bc89 100644 (file)
@@ -703,7 +703,7 @@ Result: ['74.125.43.147', '74.125.43.99', '74.125.43.103', '74.125.43.104']
          while (idx < slen):
             complen = ord(s[idx])
             # In python 3.x `str()` converts the string to unicode which is the expected text string type
-            res.append(str(s[idx+1:idx+1+complen]))
+            res.append(str(s[idx+1:idx+1+complen].decode()))
             idx += complen + 1
 
          return res