mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
dns: fix dnsrecord interactive mode
Do not crash in interactive mode of dnsrecord_{add,mod}.
https://fedorahosted.org/freeipa/ticket/4739
Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
@@ -697,7 +697,7 @@ def prompt_parts(rrtype, cmd, mod_dnsvalue=None):
|
||||
name, mod_dnsvalue)['result']
|
||||
|
||||
user_options = {}
|
||||
parts = [p for p in cmd.params if 'dnsrecord_part' in p.flags]
|
||||
parts = [p for p in cmd.params() if 'dnsrecord_part' in p.flags]
|
||||
if not parts:
|
||||
return user_options
|
||||
|
||||
@@ -714,7 +714,7 @@ def prompt_parts(rrtype, cmd, mod_dnsvalue=None):
|
||||
|
||||
def prompt_missing_parts(rrtype, cmd, kw, prompt_optional=False):
|
||||
user_options = {}
|
||||
parts = [p for p in cmd.params if 'dnsrecord_part' in p.flags]
|
||||
parts = [p for p in cmd.params() if 'dnsrecord_part' in p.flags]
|
||||
if not parts:
|
||||
return user_options
|
||||
|
||||
|
||||
Reference in New Issue
Block a user