Build Update for wikimedia/pywikibot-core
-------------------------------------
Build: #3373
Status: Errored
Duration: 1 hour, 41 minutes, and 16 seconds
Commit: 8a8a09f (master)
Author: Mpaa
Message: Update archivebot_tests.py after MW localisation update
Changed month name setting from Sep to sep
See commit Localisation updates from https://translatewiki.net.
I3d9b14ae3a5d77fea9694ef113b0180e5677c39e
See file: languages/i18n/eo.json in mediawiki repo.
Change-Id: I28ebec05941a4293d0178df8cf077bd5a46848e8
View the changeset: https://github.com/wikimedia/pywikibot-core/compare/e5f1c6012de5...8a8a09f8…
View the full build log and details: https://travis-ci.org/wikimedia/pywikibot-core/builds/120540618
--
You can configure recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications
jenkins-bot has submitted this change and it was merged.
Change subject: PreloadGenerators: clean up local dict handling
......................................................................
PreloadGenerators: clean up local dict handling
Improve dict handling and avoid if statements.
Change-Id: I83d6f4bee06938808ef52f4cf4f9cd0180123508
---
M pywikibot/pagegenerators.py
1 file changed, 10 insertions(+), 14 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index 224f93a..5a43e26 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -1861,15 +1861,13 @@
sites.setdefault(site, []).append(page)
if len(sites[site]) >= groupsize:
# if this site is at the groupsize, process it
- group = sites[site]
- sites[site] = []
+ group = sites.pop(site)
for i in site.preloadpages(group, groupsize):
yield i
- for site in sites:
- if sites[site]:
- # process any leftover sites that never reached the groupsize
- for i in site.preloadpages(sites[site], groupsize):
- yield i
+ for site, pages in sites.items():
+ # process any leftover sites that never reached the groupsize
+ for i in site.preloadpages(pages, groupsize):
+ yield i
@deprecated_args(step='groupsize')
@@ -1914,15 +1912,13 @@
sites.setdefault(site, []).append(page)
if len(sites[site]) >= groupsize:
# if this site is at the groupsize, process it
- group = sites[site]
- sites[site] = []
+ group = sites.pop(site)
for i in site.preloaditempages(group, groupsize):
yield i
- for site in sites:
- if sites[site]:
- # process any leftover sites that never reached the groupsize
- for i in site.preloaditempages(sites[site], groupsize):
- yield i
+ for site, pages in sites.items():
+ # process any leftover sites that never reached the groupsize
+ for i in site.preloaditempages(pages, groupsize):
+ yield i
@deprecated_args(number='total', step=None, repeat=None)
--
To view, visit https://gerrit.wikimedia.org/r/281276
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I83d6f4bee06938808ef52f4cf4f9cd0180123508
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>