ipaclient.plugins.dns: Cast DNS name to unicode
cmd.api.Command.dnsrecord_split_parts expects name to be unicode string and instead gets ascii. It leads to an error: ipa: ERROR: invalid 'name': must be Unicode text This commit's change is casting name's type to unicode so 'ipa dnsrecord-mod' will not fail with error above. https://pagure.io/freeipa/issue/7185 Reviewed-By: Tibor Dudlak <tdudlak@redhat.com> Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
This commit is contained in:
1 parent
620f9653ba
commit
fad88b358b
1 file changed
+1
-1
@@ -62,7 +62,7 @@ def __get_part_param(rrtype, cmd, part, output_kw, default=None):
|
||||
def prompt_parts(rrtype, cmd, mod_dnsvalue=None):
|
||||
mod_parts = None
|
||||
if mod_dnsvalue is not None:
|
||||
name = record_name_format % rrtype.lower()
|
||||
name = record_name_format % unicode(rrtype.lower())
|
||||
mod_parts = cmd.api.Command.dnsrecord_split_parts(
|
||||
name, mod_dnsvalue)['result']
|
||||
|
||||
|
||||
Reference in new issue
Block a user