From: Wouter Wijngaards Date: Wed, 2 Mar 2016 08:18:38 +0000 (+0000) Subject: - Fix #745: unbound.py - idn2dname throws UnicodeError when idnname X-Git-Tag: release-1.5.9rc1~101 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5dd79ce27acbfe821d5dce2332283e38b75832cd;p=thirdparty%2Funbound.git - Fix #745: unbound.py - idn2dname throws UnicodeError when idnname contains trailing dot. (Fix from Ralph) git-svn-id: file:///svn/unbound/trunk@3644 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 29a172029..9184d1411 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -2,6 +2,8 @@ - 1.5.8 release tag - trunk contains 1.5.9 in development. - iana portlist update. + - Fix #745: unbound.py - idn2dname throws UnicodeError when idnname + contains trailing dot. 24 February 2016: Wouter - Fix OpenBSD asynclook lock free that gets used later (fix test code). diff --git a/libunbound/python/libunbound.i b/libunbound/python/libunbound.i index 50a9b67ac..84a536929 100644 --- a/libunbound/python/libunbound.i +++ b/libunbound/python/libunbound.i @@ -945,7 +945,7 @@ int _ub_resolve_async(struct ub_ctx* ctx, char* name, int rrtype, int rrclass, v :param idnname: (unicode string) IDN name :returns: (string) domain name """ - return '.'.join([encodings.idna.ToASCII(a) for a in idnname.split('.')]) + return '.'.join([encodings.idna.ToASCII(a) if a else '' for a in idnname.split('.')]) def dname2idn(name): """Converts canonic domain name in IDN format to unicode string