Applied a patch from dkg@fifthhorseman.net: py3 compatibility: Use a list of dictionary keys
In python3, dict.keys() produces a dict_keys object, not a list. Since this code treats it as a list, we'll just be explicit about that. - Legacy-Id: 15893
This commit is contained in:
parent
c8f98e125c
commit
910d3d7723
|
@ -1278,7 +1278,7 @@ def _output(docname, fields, outfile=sys.stdout):
|
|||
outfile.write("%s " % (fields["eventdate"]))
|
||||
outfile.write("%s" % (os.path.basename(docname.strip())))
|
||||
|
||||
keys = fields.keys()
|
||||
keys = list(fields.keys())
|
||||
keys.sort()
|
||||
for key in keys:
|
||||
if fields[key] and not key in ["eventdate", ] and not key.startswith("_"):
|
||||
|
|
Loading…
Reference in a new issue