jenkins-bot has submitted this change and it was merged.

Change subject: Recognize OtherPageSaveError while restoring broken redirect
......................................................................


Recognize OtherPageSaveError while restoring broken redirect

also remove obsolete pass statements

Bug:T107551
Change-Id: I7e2307e9173886b73c480a5236d3fa5c3008f7f7
---
M scripts/redirect.py
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Merlijn van Deen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/scripts/redirect.py b/scripts/redirect.py
index 93f2b55..81ad431 100755
--- a/scripts/redirect.py
+++ b/scripts/redirect.py
@@ -457,11 +457,11 @@
                                 pywikibot.output(u"Page [[%s]] not saved; "
                                                  u"sysop privileges required."
                                                  % redir_page.title())
-                                pass
                             except pywikibot.LockedPage:
                                 pywikibot.output(u'%s is locked.'
                                                  % redir_page.title())
-                                pass
+                            except pywikibot.OtherPageSaveError:
+                                pywikibot.exception()
                 elif self.getOption('delete') and self.user_confirm(
                         u'Redirect target %s does not exist.\n'
                         u'Do you want to delete %s?'

-- 
To view, visit https://gerrit.wikimedia.org/r/228207
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7e2307e9173886b73c480a5236d3fa5c3008f7f7
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: Russell Blau <[email protected]>
Gerrit-Reviewer: XZise <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to