ImportGedcom: Fix Python3 "dictionary changed size during iteration" errors
svn: r21380
This commit is contained in:
parent
a84d51d6b7
commit
3d0fa69bd0
@ -766,7 +766,7 @@ class Lexer(object):
|
|||||||
Break circular references to parsing methods stored in dictionaries
|
Break circular references to parsing methods stored in dictionaries
|
||||||
to aid garbage collection
|
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[key]
|
||||||
del self.func_map
|
del self.func_map
|
||||||
|
|
||||||
@ -2676,7 +2676,7 @@ class GedcomParser(UpdateCallback):
|
|||||||
to aid garbage collection
|
to aid garbage collection
|
||||||
"""
|
"""
|
||||||
for func_map in self.func_list:
|
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[key]
|
||||||
del func_map
|
del func_map
|
||||||
del self.func_list
|
del self.func_list
|
||||||
|
Loading…
x
Reference in New Issue
Block a user