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