- Fix pyunbound byte string representation for python3.

git-svn-id: file:///svn/unbound/trunk@3322 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2015-01-29 16:10:51 +00:00
parent 15d16580a8
commit d17b312471
2 changed files with 4 additions and 1 deletions

View file

@ -1,3 +1,6 @@
29 January 2015: Wouter
- Fix pyunbound byte string representation for python3.
26 January 2015: Wouter 26 January 2015: Wouter
- Fix unintended use of gcc extension for incomplete enum types, - Fix unintended use of gcc extension for incomplete enum types,
compile with pedantic c99 compliance (from Daniel Dickman). compile with pedantic c99 compliance (from Daniel Dickman).

View 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): while (idx < slen):
complen = ord(s[idx]) complen = ord(s[idx])
# In python 3.x `str()` converts the string to unicode which is the expected text string type # 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 idx += complen + 1
return res return res