jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/642171 )
Change subject: [IMPR] Replaced PageNotSaved by PageSaveRelatedError ......................................................................
[IMPR] Replaced PageNotSaved by PageSaveRelatedError
Bug: T267821 Change-Id: Ic98c736d9415e78aad71b01a75ca2c963808ead1 --- M pywikibot/page/__init__.py M scripts/add_text.py M scripts/blockpageschecker.py M scripts/casechecker.py M scripts/interwiki.py 5 files changed, 6 insertions(+), 6 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/page/__init__.py b/pywikibot/page/__init__.py index c8242da..9979bdc 100644 --- a/pywikibot/page/__init__.py +++ b/pywikibot/page/__init__.py @@ -1283,7 +1283,7 @@ if not done: if not quiet: pywikibot.warning('Page %s not saved' % link) - raise pywikibot.PageNotSaved(self) + raise pywikibot.PageSaveRelatedError(self) if not quiet: pywikibot.output('Page %s saved' % link)
diff --git a/scripts/add_text.py b/scripts/add_text.py index 54c2289..f693faa 100755 --- a/scripts/add_text.py +++ b/scripts/add_text.py @@ -144,7 +144,7 @@ .format(page.title(), e.url)) except pywikibot.LockedPage: pywikibot.output('Skipping {} (locked page)'.format(page.title())) - except pywikibot.PageNotSaved as error: + except pywikibot.PageSaveRelatedError as error: pywikibot.output('Error putting page: {}'.format(error.args)) else: return True diff --git a/scripts/blockpageschecker.py b/scripts/blockpageschecker.py index e76277b..0514a63 100755 --- a/scripts/blockpageschecker.py +++ b/scripts/blockpageschecker.py @@ -498,7 +498,7 @@ except pywikibot.LockedPage: pywikibot.output('The page is still protected. ' 'Skipping...') - except pywikibot.PageNotSaved as error: + except pywikibot.PageSaveRelatedError as error: pywikibot.output('Error putting page: %s' % (error.args,)) break diff --git a/scripts/casechecker.py b/scripts/casechecker.py index 04465ac..7201a03 100755 --- a/scripts/casechecker.py +++ b/scripts/casechecker.py @@ -735,7 +735,7 @@ self.site.mediawiki_message( 'comma-separator').join(msg))) return True - except (pywikibot.LockedPage, pywikibot.PageNotSaved): + except (pywikibot.LockedPage, pywikibot.PageSaveRelatedError): self.WikiLog('* Error: Could not save updated page {} ({})' .format(self.MakeLink(title, False), coloredMsg)) return False diff --git a/scripts/interwiki.py b/scripts/interwiki.py index 08ab1e3..f5582b3 100755 --- a/scripts/interwiki.py +++ b/scripts/interwiki.py @@ -1803,10 +1803,10 @@ 'ERROR putting page: {0} blacklisted by spamfilter. ' 'Giving up.'.format(error.url)) raise SaveError('Spam filter') - except pywikibot.PageNotSaved as error: + except pywikibot.PageSaveRelatedError as error: pywikibot.output('ERROR putting page: {}' .format(error.args,)) - raise SaveError('PageNotSaved') + raise SaveError('PageSaveRelatedError') except (socket.error, IOError) as error: if timeout > 3600: raise
pywikibot-commits@lists.wikimedia.org