jenkins-bot has submitted this change and it was merged.
Change subject: Skip RC entries without a title ......................................................................
Skip RC entries without a title
The title in a log entry may have been suppressed, and wont appear in the item data.
Bug: T78152 Change-Id: I2b27813eb2b6861d606177f69d2eefa813c0cbd0 --- M pywikibot/pagegenerators.py 1 file changed, 6 insertions(+), 0 deletions(-)
Approvals: Merlijn van Deen: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py index 12e7523..dd96d21 100644 --- a/pywikibot/pagegenerators.py +++ b/pywikibot/pagegenerators.py @@ -994,6 +994,9 @@ showPatrolled=showPatrolled, topOnly=topOnly, step=step, total=total, user=user, excludeuser=excludeuser): + # The title in a log entry may have been suppressed + if 'title' not in item and item['type'] == 'log': + continue yield pywikibot.Page(pywikibot.Link(item["title"], site))
@@ -2047,6 +2050,9 @@ from pywikibot.comms.rcstream import site_rc_listener
for entry in site_rc_listener(site, total=total): + # The title in a log entry may have been suppressed + if 'title' not in entry and entry['type'] == 'log': + continue page = pywikibot.Page(site, entry['title'], entry['namespace']) page._rcinfo = entry yield page
pywikibot-commits@lists.wikimedia.org