summaryrefslogtreecommitdiffstats
path: root/ipapython/sysrestore.py
diff options
context:
space:
mode:
authorMartin Babinsky <mbabinsk@redhat.com>2016-10-11 17:35:01 +0200
committerMartin Basti <mbasti@redhat.com>2016-10-12 10:38:52 +0200
commit71f642f75132fe30b40062ce5abc8558a275b9bb (patch)
treeca5c59516d1f1d2c915bc7e0aee8695e77428e53 /ipapython/sysrestore.py
parent29829cc55a6be697abf881ea7867ef834bb66be7 (diff)
downloadfreeipa-71f642f75132fe30b40062ce5abc8558a275b9bb.tar.gz
freeipa-71f642f75132fe30b40062ce5abc8558a275b9bb.tar.xz
freeipa-71f642f75132fe30b40062ce5abc8558a275b9bb.zip
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>
Diffstat (limited to 'ipapython/sysrestore.py')
-rw-r--r--ipapython/sysrestore.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipapython/sysrestore.py b/ipapython/sysrestore.py
index 2a8f44826..62572683a 100644
--- a/ipapython/sysrestore.py
+++ b/ipapython/sysrestore.py
@@ -346,7 +346,7 @@ class StateFile(object):
"""
root_logger.debug("Saving StateFile to '%s'", self._path)
- for module in list(self.modules.keys()):
+ for module in list(self.modules):
if len(self.modules[module]) == 0:
del self.modules[module]
@@ -359,7 +359,7 @@ class StateFile(object):
p = SafeConfigParser()
p.optionxform = str
- for module in self.modules.keys():
+ for module in self.modules:
p.add_section(module)
for (key, value) in self.modules[module].items():
p.set(module, key, str(value))