except ImportError:
from .global_version import __version__ as my_version
-__version__ = '0.1.0'
+__version__ = '0.2.1'
LOG = logging.getLogger(__name__)
for item in self.args.items:
- print(" * {i!r}:".format(i=item))
+ if item == 'xn--':
+ print(" * {}".format(self.colored(
+ "Invalid item 'xn--'", ('BOLD', 'RED'))))
+ continue
+
+ item_idna = item
+ if 'xn--' in item:
+ item_idna = to_str(to_bytes(item).decode('idna'))
+ else:
+ item_idna = to_str(item.encode('idna'))
+
+ print(" * {i!r}: {p!r}".format(i=item, p=item_idna))
# =============================================================================