Revision: 7901 Author: alexsh Date: 2010-01-31 14:54:36 +0000 (Sun, 31 Jan 2010)
Log Message: ----------- Fix: use defaultNamespace to define category page NS.
Modified Paths: -------------- trunk/pywikipedia/catlib.py
Modified: trunk/pywikipedia/catlib.py =================================================================== --- trunk/pywikipedia/catlib.py 2010-01-29 15:49:12 UTC (rev 7900) +++ trunk/pywikipedia/catlib.py 2010-01-31 14:54:36 UTC (rev 7901) @@ -473,8 +473,7 @@ Returns true if copying was successful, false if target page already existed. """ - catname = self.site().category_namespace() + ':' + catname - targetCat = wikipedia.Page(self.site(), catname) + targetCat = wikipedia.Page(self.site(), catname, defaultNamespace=14) if targetCat.exists(): wikipedia.output('Target page %s already exists!' % targetCat.title()) return False
pywikipedia-svn@lists.wikimedia.org