jenkins-bot has submitted this change and it was merged.
Change subject: [bugfix] Don't break watchlist.py for InvalidTitle
......................................................................
[bugfix] Don't break watchlist.py for InvalidTitle
Instead of breaking the script print the error message.
Bug: T106954
Change-Id: Ie8ca8fa4c66d724b998be72b53a389a402c55e7e
---
M scripts/watchlist.py
1 file changed, 4 insertions(+), 1 deletion(-)
Approvals:
John Vandenberg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/watchlist.py b/scripts/watchlist.py
index 9774c5d..316ed70 100755
--- a/scripts/watchlist.py
+++ b/scripts/watchlist.py
@@ -115,7 +115,10 @@
watchlist = refresh(site, sysop=sysop)
pywikibot.output(u'%i pages in the watchlist.' % len(watchlist))
for page in watchlist:
- pywikibot.stdout(page.title())
+ try:
+ pywikibot.stdout(page.title())
+ except pywikibot.InvalidTitle:
+ pywikibot.exception()
if __name__ == "__main__":
main()
--
To view, visit
https://gerrit.wikimedia.org/r/279585
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie8ca8fa4c66d724b998be72b53a389a402c55e7e
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>