Malafaya has uploaded a new change for review.
https://gerrit.wikimedia.org/r/231577
Change subject: T109077 Performance decreased saving pages for sites with
non-alphabetical code interwiki sort (interwiki_putfirst specified)
......................................................................
T109077 Performance decreased saving pages for sites with non-alphabetical
code interwiki sort (interwiki_putfirst specified)
Change-Id: I97e8ecf44c3e8099113068c343f35af94bc02e84
---
M pywikibot/textlib.py
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core
refs/changes/77/231577/1
diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py
index 77454fc..bd7adbd 100644
--- a/pywikibot/textlib.py
+++ b/pywikibot/textlib.py
@@ -962,8 +962,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)]
--
To view, visit https://gerrit.wikimedia.org/r/231577
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I97e8ecf44c3e8099113068c343f35af94bc02e84
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Malafaya <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits