Skip to content

Commit f13f7c1

Browse files
Merge pull request #6 from moben/dict-iteration
Avoid iterating over a changing dict
2 parents 255a5c7 + bbe30ec commit f13f7c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/apipkg/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def initpkg(pkgname, exportdefs, attr=None, eager=False):
5959
sys.modules[pkgname] = mod
6060
# eagerload in bypthon to avoid their monkeypatching breaking packages
6161
if 'bpython' in sys.modules or eager:
62-
for module in sys.modules.values():
62+
for module in list(sys.modules.values()):
6363
if isinstance(module, ApiModule):
6464
module.__dict__
6565

0 commit comments

Comments
 (0)