VMM/handler: Improved domaininfo subcommand.
Check all labels for ASCII-compatible encoding, not only the first one.
If something is in ACE format, convert it to IDNA.
--- a/VirtualMailManager/handler.py Sun Jan 26 16:13:00 2014 +0000
+++ b/VirtualMailManager/handler.py Mon Jan 27 21:27:21 2014 +0000
@@ -522,7 +522,8 @@
INVALID_ARGUMENT)
dom = self._get_domain(domainname)
dominfo = dom.get_info()
- if dominfo['domain name'].startswith('xn--'):
+ if dominfo['domain name'].startswith('xn--') or \
+ dominfo['domain name'].count('.xn--'):
dominfo['domain name'] += ' (%s)' % \
dominfo['domain name'].decode('idna')
if details is None: