https://bugzilla.wikimedia.org/show_bug.cgi?id=55217
Web browser: --- Bug ID: 55217 Summary: _getContentsNaive doesn't honour "recurse" parameter Product: Pywikibot Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: legoktm.wikipedia@gmail.com Classification: Unclassified Mobile Platform: ---
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1403/ Reported by: Anonymous user Created on: 2012-02-03 21:35:56 Subject: _getContentsNaive doesn't honour "recurse" parameter Original description:
--- catlib.py (révision 9851) +++ catlib.py (copie de travail) @@ -170,7 +170,12 @@ sortby=sortby, sortdir=sortdir): yield tag, page if tag == SUBCATEGORY and recurse: - for item in page._getContentsNaive(recurse=True, + if recurse: + if type(recurse) is int: + newrecurse = recurse - 1 + else: + newrecurse = recurse + for item in page._getContentsNaive(recurse=newrecurse, sortby=sortby, sortdir=sortdir): yield item
my version:
guillaume@barbaz:~/src/pywikipedia$ python version.py Pywikipedia [http] trunk/pywikipedia (r9850, 2012/02/01, 12:21:57) Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) [GCC 4.5.2] config-settings: use_api = True use_api_login = True unicode test: ok
https://bugzilla.wikimedia.org/show_bug.cgi?id=55217
Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://sourceforge.net/p/p | |ywikipediabot/bugs/1403
https://bugzilla.wikimedia.org/show_bug.cgi?id=55217
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jayvdb@gmail.com Version|unspecified |compat (1.0)
pywikipedia-bugs@lists.wikimedia.org