jenkins-bot has submitted this change and it was merged.
Change subject: Interwikibot crashes when page is empty ......................................................................
Interwikibot crashes when page is empty
SaveError expects arguments.
The Error class in pywikibot.exceptions requires at least one additional parameter (the other is defined automatically) since cde6b11565e2068bf052041dd2ad563658c4faf3 and the interwiki.py script is calling SaveError without a parameter since e8c2790c5b8bd38d905ff32c6f5ca9efd7d3721b, which was uploaded about three years after the change to the Error class (in fact this was the second change to pywikibot.exceptions only when this happened). At that time SaveError already subclassed Error so this bug is probably in it ever since. (taken from bug report analysed by XZise).
Bug: T85676 Change-Id: Ica77c4e9592085e681d113deb3bb502a8c81bb14 --- M scripts/interwiki.py 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: John Vandenberg: Looks good to me, approved XZise: Looks good to me, but someone else must approve jenkins-bot: Verified
diff --git a/scripts/interwiki.py b/scripts/interwiki.py index 342cd5e..55d5667 100755 --- a/scripts/interwiki.py +++ b/scripts/interwiki.py @@ -1843,7 +1843,7 @@ raise SaveError(u'Page doesn't exist') if page.isEmpty() and not page.isCategory(): pywikibot.output(u"Not editing %s: page is empty" % page) - raise SaveError + raise SaveError(u'Page is empty.')
# clone original newPages dictionary, so that we can modify it to the # local page's needs