mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-26 16:16:31 -06:00
CLI conversion of DNSName type
Part of ticket: IPA should allow internationalized domain names https://fedorahosted.org/freeipa/ticket/3169 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
parent
d0cf1f3e94
commit
b9969c6afe
@ -51,6 +51,7 @@ from constants import CLI_TAB, LDAP_GENERALIZED_TIME_FORMAT
|
||||
from parameters import File, Str, Enum, Any
|
||||
from text import _
|
||||
from ipapython.version import API_VERSION
|
||||
from ipapython.dnsutil import DNSName
|
||||
|
||||
import datetime
|
||||
|
||||
@ -160,6 +161,8 @@ class textui(backend.Backend):
|
||||
return base64.b64encode(value)
|
||||
elif type(value) is datetime.datetime:
|
||||
return value.strftime(LDAP_GENERALIZED_TIME_FORMAT)
|
||||
elif isinstance(value, DNSName):
|
||||
return unicode(value)
|
||||
else:
|
||||
return value
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user