http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10681
Revision: 10681 Author: xqt Date: 2012-11-10 10:22:42 +0000 (Sat, 10 Nov 2012) Log Message: ----------- pass namespace parameter in Category.articles(), fix for bug #3585778, patch submitted by Legoktm - thanks
Modified Paths: -------------- branches/rewrite/pywikibot/page.py
Modified: branches/rewrite/pywikibot/page.py =================================================================== --- branches/rewrite/pywikibot/page.py 2012-11-08 14:05:25 UTC (rev 10680) +++ branches/rewrite/pywikibot/page.py 2012-11-10 10:22:42 UTC (rev 10681) @@ -1723,7 +1723,7 @@ """ if namespaces is None: namespaces = [x for x in self.site.namespaces() - if x>=0 and x!=14] + if x >= 0 and x <> 14] for member in self.site.categorymembers(self, namespaces=namespaces, step=step, total=total, @@ -1737,9 +1737,9 @@ if not isinstance(recurse, bool) and recurse: recurse = recurse - 1 for subcat in self.subcategories(step=step): - for article in subcat.articles( - recurse, step=step, total=total, - content=content): + for article in subcat.articles(recurse, step=step, total=total, + content=content, + namespaces=namespaces): yield article if total is not None: total -= 1