mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-09-06 09:57:43 +02:00
- 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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user