mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
pylint: Iterate through dictionaries
The consider-iterating-dictionary check disable never worked before (notice the missing comma in pylintrc). Fix the rest of the dict iteration. https://pagure.io/freeipa/issue/6874 Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
parent
f7fc3a3fc1
commit
353d4934af
@ -2920,7 +2920,7 @@ class dnszone_find(DNSZoneBase_find):
|
|||||||
if options.get('forward_only', False):
|
if options.get('forward_only', False):
|
||||||
search_kw = {}
|
search_kw = {}
|
||||||
search_kw['idnsname'] = [revzone.ToASCII() for revzone in
|
search_kw['idnsname'] = [revzone.ToASCII() for revzone in
|
||||||
REVERSE_DNS_ZONES.keys()]
|
REVERSE_DNS_ZONES]
|
||||||
rev_zone_filter = ldap.make_filter(search_kw,
|
rev_zone_filter = ldap.make_filter(search_kw,
|
||||||
rules=ldap.MATCH_NONE,
|
rules=ldap.MATCH_NONE,
|
||||||
exact=False,
|
exact=False,
|
||||||
@ -3094,7 +3094,7 @@ class dnsrecord(LDAPObject):
|
|||||||
|
|
||||||
if not zone_len:
|
if not zone_len:
|
||||||
allowed_zones = ', '.join([unicode(revzone) for revzone in
|
allowed_zones = ', '.join([unicode(revzone) for revzone in
|
||||||
REVERSE_DNS_ZONES.keys()])
|
REVERSE_DNS_ZONES])
|
||||||
raise errors.ValidationError(name='ptrrecord',
|
raise errors.ValidationError(name='ptrrecord',
|
||||||
error=unicode(_('Reverse zone for PTR record should be a sub-zone of one the following fully qualified domains: %s') % allowed_zones))
|
error=unicode(_('Reverse zone for PTR record should be a sub-zone of one the following fully qualified domains: %s') % allowed_zones))
|
||||||
|
|
||||||
|
1
pylintrc
1
pylintrc
@ -93,7 +93,6 @@ disable=
|
|||||||
redefined-argument-from-local, # new in pylint 1.7
|
redefined-argument-from-local, # new in pylint 1.7
|
||||||
consider-merging-isinstance, # new in pylint 1.7
|
consider-merging-isinstance, # new in pylint 1.7
|
||||||
unsupported-assignment-operation # new in pylint 1.7
|
unsupported-assignment-operation # new in pylint 1.7
|
||||||
consider-iterating-dictionary, # wontfix for better python2/3 code
|
|
||||||
|
|
||||||
|
|
||||||
[REPORTS]
|
[REPORTS]
|
||||||
|
Loading…
Reference in New Issue
Block a user