py3: iteritems -> items, iterkeys -> keys

This commit is contained in:
looooo
2018-12-08 00:03:31 +01:00
committed by Yorik van Havre
parent 9d395235b9
commit 1476caf281
9 changed files with 17 additions and 17 deletions

View File

@@ -113,7 +113,7 @@ def write(filename, dictionary):
user = contents[-1]
for p in key[1]:
contents[-1][p] = ""
for k, i in dictionary.iteritems():
for k, i in dictionary.items():
found = False
for group in contents:
if not found:
@@ -145,7 +145,7 @@ def write(filename, dictionary):
if len(s) > 1:
# if the section has no contents, we don't write it
f.write("[" + s["keyname"] + "]\n")
for k, i in s.iteritems():
for k, i in s.items():
if (k != "keyname" and i != '') or k == "Name":
# use only keys which are not empty and the name even if empty
f.write(k + "=" + i.encode('utf-8') + "\n")