ImportGedcom: Fix Python3 "dictionary changed size during iteration" errors

svn: r21380
This commit is contained in:
John Ralls 2013-02-19 22:11:35 +00:00
parent a84d51d6b7
commit 3d0fa69bd0

View File

@ -766,7 +766,7 @@ class Lexer(object):
Break circular references to parsing methods stored in dictionaries
to aid garbage collection
"""
for key in (self.func_map.keys()):
for key in list(self.func_map.keys()):
del self.func_map[key]
del self.func_map
@ -2676,7 +2676,7 @@ class GedcomParser(UpdateCallback):
to aid garbage collection
"""
for func_map in self.func_list:
for key in func_map.keys():
for key in list(func_map.keys()):
del func_map[key]
del func_map
del self.func_list