John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/275272
Change subject: Fix -cat pagegenerator ...................................................................... Fix -cat pagegenerator -cat without an argument was broken in 343b875 This broken unit test test_pagegen_i18n_input Also properly deprecated the old 'arg' argument for public GeneratorFactory.getCategory and .getCategoryGen which was also a breaking change in 343b875. Change-Id: Ifca4c65737e1f67f14576f540bdafcd0b82daf4c --- M pywikibot/pagegenerators.py 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/72/275272/1 diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py index 2f80a3b..7c9854e 100644 --- a/pywikibot/pagegenerators.py +++ b/pywikibot/pagegenerators.py @@ -475,6 +475,7 @@ return dupfiltergen + @deprecated_args(arg='category') def getCategory(self, category): """ Return Category and start as defined by category. @@ -483,7 +484,7 @@ @type category: str @rtype: tuple """ - if category.startswith('-'): # old arg parameter + if category and category.startswith('-'): categoryname = category.partition(':')[2] issue_deprecation_warning( 'The usage of "{0}" as actual parameter of ' @@ -491,6 +492,7 @@ categoryname, 2, ArgumentDeprecationWarning) else: categoryname = category + if not categoryname: categoryname = i18n.input( 'pywikibot-enter-category-name', @@ -512,6 +514,7 @@ defaultNamespace=14)) return cat, startfrom + @deprecated_args(arg='category') def getCategoryGen(self, category, recurse=False, content=False, gen_func=None): """ -- To view, visit https://gerrit.wikimedia.org/r/275272 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifca4c65737e1f67f14576f540bdafcd0b82daf4c Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: John Vandenberg <jay...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits