mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -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:
committed by
Martin Kosek
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 parameters import File, Str, Enum, Any
|
||||||
from text import _
|
from text import _
|
||||||
from ipapython.version import API_VERSION
|
from ipapython.version import API_VERSION
|
||||||
|
from ipapython.dnsutil import DNSName
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
@@ -160,6 +161,8 @@ class textui(backend.Backend):
|
|||||||
return base64.b64encode(value)
|
return base64.b64encode(value)
|
||||||
elif type(value) is datetime.datetime:
|
elif type(value) is datetime.datetime:
|
||||||
return value.strftime(LDAP_GENERALIZED_TIME_FORMAT)
|
return value.strftime(LDAP_GENERALIZED_TIME_FORMAT)
|
||||||
|
elif isinstance(value, DNSName):
|
||||||
|
return unicode(value)
|
||||||
else:
|
else:
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user