Xqt has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/773991 )

Change subject: [bugfix] Do not iterate over sys.modules
......................................................................

[bugfix] Do not iterate over sys.modules

See:
- https://docs.python.org/3/library/sys.html#sys.modules
- https://githubhot.com/repo/flexmock/flexmock/issues/123

Bug: T304785
Change-Id: I10c35b0ec9f63a1399be2de5cc446c305d7da39c
---
M pywikibot/bot.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Ammarpad: Looks good to me, but someone else must approve
  Xqt: Verified; Looks good to me, approved



diff --git a/pywikibot/bot.py b/pywikibot/bot.py
index e9106ba..5d2c9f1 100644
--- a/pywikibot/bot.py
+++ b/pywikibot/bot.py
@@ -507,7 +507,7 @@

     # imported modules
     log('MODULES:')
-    for module in sys.modules.values():
+    for module in sys.modules.copy().values():
         filename = version.get_module_filename(module)
         if not filename:
             continue

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/773991
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I10c35b0ec9f63a1399be2de5cc446c305d7da39c
Gerrit-Change-Number: 773991
Gerrit-PatchSet: 4
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Ammarpad <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to