XZise has uploaded a new change for review.
https://gerrit.wikimedia.org/r/186335
Change subject: [IMPROV] Category: Query again on invalid category
......................................................................
[IMPROV] Category: Query again on invalid category
It shouldn't try jumping to a category without any name. Instead ask the
user again.
Change-Id: I53d470df16766b1d34f14248de2b8c7abb47243a
---
M scripts/category.py
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core
refs/changes/35/186335/1
diff --git a/scripts/category.py b/scripts/category.py
index 2b68625..9753a1f 100755
--- a/scripts/category.py
+++ b/scripts/category.py
@@ -884,6 +884,9 @@
elif choice in ['j', 'J']:
newCatTitle = pywikibot.input(u'Please enter the category the '
u'article should be moved to:')
+ if not newCatTitle:
+ # user pressed an unknown command. Prompt him again.
+ continue
newCat = pywikibot.Category(pywikibot.Link('Category:' +
newCatTitle))
# recurse into chosen category
--
To view, visit https://gerrit.wikimedia.org/r/186335
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I53d470df16766b1d34f14248de2b8c7abb47243a
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits