[Pywikipedia-l] SVN: [4664] trunk/pywikipedia/blockpageschecker.py

filnik at svn.wikimedia.org filnik at svn.wikimedia.org
Sun Dec 9 14:46:54 UTC 2007


Revision: 4664
Author:   filnik
Date:     2007-12-09 14:46:49 +0000 (Sun, 09 Dec 2007)

Log Message:
-----------
Bugfix, check all the categories not only the last one

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

Modified: trunk/pywikipedia/blockpageschecker.py
===================================================================
--- trunk/pywikipedia/blockpageschecker.py	2007-12-09 14:38:50 UTC (rev 4663)
+++ trunk/pywikipedia/blockpageschecker.py	2007-12-09 14:46:49 UTC (rev 4664)
@@ -97,11 +97,14 @@
     category = wikipedia.translate(site, categoryToCheck)
     commentUsed = wikipedia.translate(site, comment)
     if not generator:
+        generator = list()
         # Define the category if no other generator has been setted
         for CAT in category:
             cat = catlib.Category(site, CAT)
             # Define the generator
-            generator = pagegenerators.CategorizedPageGenerator(cat)
+            gen = pagegenerators.CategorizedPageGenerator(cat)
+            for pageCat in gen:
+                generator.append(pageCat)
     # Main Loop
     for page in generator:
         pagename = page.title()





More information about the Pywikipedia-l mailing list