do not use keys() method when iterating through dictionaries

pylint-1.6.4-1.fc26.noarch reports "C0201(consider-iterating-dictionary)" when
building FreeIPA, we have to fix these errors

https://fedorahosted.org/freeipa/ticket/6391

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Martin Babinsky
2016-10-11 17:35:01 +02:00
committed by Martin Basti
parent 29829cc55a
commit 71f642f751
6 changed files with 11 additions and 11 deletions

View File

@@ -802,7 +802,7 @@ def uninstall(options, env):
root_logger.error('Some files have not been restored, see %s' %
paths.SYSRESTORE_INDEX)
has_state = False
for module in statestore.modules.keys():
for module in statestore.modules:
root_logger.error('Some installation state for %s has not been '
'restored, see /var/lib/ipa/sysrestore/sysrestore.state',
module)