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:
Stanislav Laznicka 2017-08-22 13:57:16 +02:00
parent f7fc3a3fc1
commit 353d4934af
2 changed files with 2 additions and 3 deletions

View File

@ -2920,7 +2920,7 @@ class dnszone_find(DNSZoneBase_find):
if options.get('forward_only', False):
search_kw = {}
search_kw['idnsname'] = [revzone.ToASCII() for revzone in
REVERSE_DNS_ZONES.keys()]
REVERSE_DNS_ZONES]
rev_zone_filter = ldap.make_filter(search_kw,
rules=ldap.MATCH_NONE,
exact=False,
@ -3094,7 +3094,7 @@ class dnsrecord(LDAPObject):
if not zone_len:
allowed_zones = ', '.join([unicode(revzone) for revzone in
REVERSE_DNS_ZONES.keys()])
REVERSE_DNS_ZONES])
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))

View File

@ -93,7 +93,6 @@ disable=
redefined-argument-from-local, # new in pylint 1.7
consider-merging-isinstance, # new in pylint 1.7
unsupported-assignment-operation # new in pylint 1.7
consider-iterating-dictionary, # wontfix for better python2/3 code
[REPORTS]