http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10068
Revision: 10068 Author: xqt Date: 2012-03-31 12:33:16 +0000 (Sat, 31 Mar 2012) Log Message: ----------- fix for r10063, 3rd (not used) argument for BACK() method
Modified Paths: -------------- trunk/pywikipedia/featured.py
Modified: trunk/pywikipedia/featured.py =================================================================== --- trunk/pywikipedia/featured.py 2012-03-31 07:56:23 UTC (rev 10067) +++ trunk/pywikipedia/featured.py 2012-03-31 12:33:16 UTC (rev 10068) @@ -60,7 +60,7 @@ from pywikibot import i18n import catlib, config
-def CAT(site, name, hide=None): +def CAT(site, name, hide): name = site.namespace(14) + ':' + name cat=catlib.Category(site, name) for article in cat.articles(endsort=hide): @@ -69,9 +69,8 @@ for article in cat.articles(startFrom=chr(ord(hide)+1)): yield article
-def BACK(site,name): - name = site.namespace(10) + ':' + name - p=pywikibot.Page(site, name) +def BACK(site, name, hide): + p=pywikibot.Page(site, name, defaultNamespace=10) return [page for page in p.getReferences(follow_redirects=False, onlyTemplateInclusion=True)]
pywikipedia-svn@lists.wikimedia.org