Xqt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/279585

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: 106954
Change-Id: Ie8ca8fa4c66d724b998be72b53a389a402c55e7e
---
M scripts/watchlist.py
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/85/279585/1

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: newchange
Gerrit-Change-Id: Ie8ca8fa4c66d724b998be72b53a389a402c55e7e
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <[email protected]>

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

Reply via email to