http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10099
Revision: 10099 Author: xqt Date: 2012-04-09 12:00:15 +0000 (Mon, 09 Apr 2012) Log Message: ----------- use category_namespace() instead of namespace(14); some PEP8
Modified Paths: -------------- trunk/pywikipedia/noreferences.py
Modified: trunk/pywikipedia/noreferences.py =================================================================== --- trunk/pywikipedia/noreferences.py 2012-04-08 23:03:48 UTC (rev 10098) +++ trunk/pywikipedia/noreferences.py 2012-04-09 12:00:15 UTC (rev 10099) @@ -418,7 +418,7 @@
class NoReferencesBot:
- def __init__(self, generator, always = False): + def __init__(self, generator, always=False): self.generator = generator self.always = always self.site = pywikibot.getSite() @@ -437,7 +437,7 @@ except KeyError: self.referencesText = u'<references />'
- def lacksReferences(self, text, verbose = True): + def lacksReferences(self, text, verbose=True): """ Checks whether or not the page is lacking a references tag. """ @@ -673,7 +673,8 @@ import catlib if not namespaces: namespaces = [0] - cat = catlib.Category(site, "%s:%s" % (site.namespace(14), cat)) + cat = catlib.Category(site, "%s:%s" % (site.category_namespace(), + cat)) gen = pagegenerators.CategorizedPageGenerator(cat) if not gen: pywikibot.showHelp('noreferences')