Revision: 5892 Author: multichill Date: 2008-09-13 16:16:33 +0000 (Sat, 13 Sep 2008)
Log Message: ----------- When filter categories is acting up, dont remove all categories.
Modified Paths: -------------- trunk/pywikipedia/imagerecat.py
Modified: trunk/pywikipedia/imagerecat.py =================================================================== --- trunk/pywikipedia/imagerecat.py 2008-09-13 10:13:44 UTC (rev 5891) +++ trunk/pywikipedia/imagerecat.py 2008-09-13 16:16:33 UTC (rev 5892) @@ -197,7 +197,9 @@ filterCategoriesRe = re.compile('[[Category:([^]]*)]]') result = filterCategoriesRe.findall(filterCategoriesPage.read().decode('utf-8')) #except: - + if not result: + #Is empty, dont want to remove all categories + return categories return result