[Pywikipedia-l] SVN: [6269] trunk/pywikipedia/wikipedia.py

russblau at svn.wikimedia.org russblau at svn.wikimedia.org
Mon Jan 19 12:53:43 UTC 2009


Revision: 6269
Author:   russblau
Date:     2009-01-19 12:53:43 +0000 (Mon, 19 Jan 2009)

Log Message:
-----------
adding missing Site method; disabling category redirect detection pending more tests

Modified Paths:
--------------
    trunk/pywikipedia/wikipedia.py

Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py	2009-01-19 00:28:40 UTC (rev 6268)
+++ trunk/pywikipedia/wikipedia.py	2009-01-19 12:53:43 UTC (rev 6269)
@@ -834,10 +834,10 @@
                 self._redirarg = redirtarget
             else:
                 raise IsRedirectPage(redirtarget)
-        elif self.isCategoryRedirect(): # sets _redirarg
-            if not get_redirect:
-                self._getexception = IsRedirectPage
-                raise IsRedirectPage, self._redirarg
+##        elif self.isCategoryRedirect(): # sets _redirarg
+##            if not get_redirect:
+##                self._getexception = IsRedirectPage
+##                raise IsRedirectPage, self._redirarg
         if self.section():
             # TODO: What the hell is this? Docu please.
             m = re.search("\.3D\_*(\.27\.27+)?(\.5B\.5B)?\_*%s\_*(\.5B\.5B)?(\.27\.27+)?\_*\.3D" % re.escape(self.section()), sectionencode(text,self.site().encoding()))
@@ -5721,6 +5721,9 @@
         """Return a list of all valid names for the Category namespace."""
         return self.family.category_namespaces(self.lang)
 
+    def category_redirects(self):
+        return self.family.category_redirects(self.lang)
+
     def image_namespace(self, fallback = '_default'):
         """Return the canonical name of the Image namespace on this site."""
         # equivalent to self.namespace(6)?





More information about the Pywikipedia-l mailing list