jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/440336 )
Change subject: [bugfix] assert for BasePage instead of Page in BaseBot.run ......................................................................
[bugfix] assert for BasePage instead of Page in BaseBot.run
Bug: T197218 Change-Id: I58c9dba812e8c2ec5d68bbea8a33813e1de37436 --- M pywikibot/bot.py 1 file changed, 4 insertions(+), 4 deletions(-)
Approvals: Dalba: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/bot.py b/pywikibot/bot.py index 0a65ca4..51ad1bc 100644 --- a/pywikibot/bot.py +++ b/pywikibot/bot.py @@ -1457,7 +1457,7 @@ def run(self): """Process all pages in generator.
- @raise AssertionError: "page" is not a pywikibot.Page object + @raise AssertionError: "page" is not a pywikibot.page.BasePage object """ self._start_ts = pywikibot.Timestamp.now() if not hasattr(self, 'generator'): @@ -1493,9 +1493,9 @@ else: page = initialized_page
- assert isinstance(page, pywikibot.Page), \ - '"page" is not a pywikibot.Page object but {}.'.format( - page.__class__) + assert isinstance(page, pywikibot.page.BasePage), ( + '"page" is not a pywikibot.page.BasePage object but {}.' + .format(page.__class__))
if self.skip_page(page): continue
pywikibot-commits@lists.wikimedia.org