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 authored and Petr Vobornik committed 2014-11-19 13:37:48 +01:00
1 parent a86d8e8064
commit d2ffd17617
1 file changed
+2
+2
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))