summaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
diff options
context:
space:
mode:
authorJulien Schueller <schueller@phimeca.com>2019-07-14 11:24:24 +0200
committerJulien Schueller <schueller@phimeca.com>2019-07-19 22:09:08 +0200
commitdc73e75c1802df9e7594097ca65327b937097b3f (patch)
treeafd4bdc434fed81bf2585b056f955f94846a36ed /sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
parent2228615ac4f55abf07a1f7e28bbbfee9f3ae036a (diff)
Fix RuntimeError: dictionary changed size during iteration
Seems the dictionary of modules needs to be copied before iterating Fixes https://github.com/spyder-ide/qtpy/issues/195 Change-Id: I8517e031c4a250856d3318b364b1cd5dab3f8f80 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py')
-rw-r--r--sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
index b8097719..36b13710 100644
--- a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
+++ b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
@@ -225,7 +225,7 @@ class Reloader(object):
self.sys_module_count = len(sys.modules)
g = globals()
# PYSIDE-1009: Try to recognize unknown modules in errorhandler.py
- candidates = list(mod_name for mod_name in sys.modules
+ candidates = list(mod_name for mod_name in sys.modules.copy()
if self.module_valid(sys.modules[mod_name]))
for mod_name in candidates:
# 'top' is PySide2 when we do 'import PySide.QtCore'