jenkins-bot has submitted this change and it was merged.
Change subject: Performance fix for sites using interwiki_putfirst option ......................................................................
Performance fix for sites using interwiki_putfirst option
Bug: T109077 Change-Id: I97e8ecf44c3e8099113068c343f35af94bc02e84 (cherry picked from commit d3f9b7f0c2165b562d35b0da04fe9dd48a45b9fa) --- M pywikibot/textlib.py 1 file changed, 2 insertions(+), 1 deletion(-)
Approvals: John Vandenberg: Looks good to me, approved Malafaya: Looks good to me, but someone else must approve jenkins-bot: Verified
diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py index a1d2c55..b40aba4 100644 --- a/pywikibot/textlib.py +++ b/pywikibot/textlib.py @@ -714,8 +714,9 @@ if putfirst: # In this case I might have to change the order firstsites = [] + validlanglinks = insite.validLanguageLinks() for code in putfirst: - if code in insite.validLanguageLinks(): + if code in validlanglinks: site = insite.getSite(code=code) if site in sites: del sites[sites.index(site)]
pywikibot-commits@lists.wikimedia.org