Bug 3018: ImportGrdb: remove calls to keys() dictionary method where possible

svn: r12572
This commit is contained in:
Gerald Britton
2009-05-26 20:48:09 +00:00
parent 51f65aa02f
commit 5eb7e18dc6
47 changed files with 134 additions and 199 deletions

View File

@@ -98,12 +98,10 @@ class IniKeyClient(object):
fp = open(filename, "w")
fp.write(";; Gramps key file" + NL)
fp.write((";; Automatically created at %s" % time.strftime("%Y/%m/%d %H:%M:%S")) + NL + NL)
sections = self.data.keys()
sections.sort()
sections = sorted(self.data)
for section in sections:
fp.write(("[%s]" + NL) % section)
keys = self.data[section].keys()
keys.sort()
keys = sorted(self.data[section])
for key in keys:
fp.write(("%s=%s" + NL)% (key, self.data[section][key]))
fp.write(NL)