jenkins-bot merged this change.
[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(-)
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
To view, visit change 440336. To unsubscribe, or for help writing mail filters, visit settings.