Fix: zonemgr must be unicode value

To support IDNA --zonemgr option must be unicode not ascii

https://fedorahosted.org/freeipa/ticket/4724

Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
Martin Basti
2014-11-13 18:22:22 +01:00
committed by Petr Vobornik
parent a86d8e8064
commit d2ffd17617

View File

@@ -403,6 +403,8 @@ def zonemgr_callback(option, opt_str, value, parser):
"""
# validate the value first
try:
# IDNA support requires unicode
value = value.decode(sys.stdin.encoding)
validate_zonemgr_str(value)
except ValueError, e:
parser.error("invalid zonemgr: " + unicode(e))