Revision: 5216 Author: russblau Date: 2008-04-12 18:17:39 +0000 (Sat, 12 Apr 2008)
Log Message: ----------- fix bug with addedCat option
Modified Paths: -------------- trunk/pywikipedia/replace.py
Modified: trunk/pywikipedia/replace.py =================================================================== --- trunk/pywikipedia/replace.py 2008-04-12 15:01:22 UTC (rev 5215) +++ trunk/pywikipedia/replace.py 2008-04-12 18:17:39 UTC (rev 5216) @@ -250,7 +250,7 @@ are made. * allowoverlap - If True, when matches overlap, all of them are replaced. - * addedCat - If set to a value, add this category to every page + * addedCat - If set to a value, add this category to every page touched.
Structure of the exceptions dictionary: @@ -363,7 +363,7 @@ new_text = newest_text newest_text = self.doReplacements(new_text)
- if self.addedCat: + if hasattr(self, "addedCat"): cats = page.categories(nofollow_redirects=True) if self.addedCat not in cats: cats.append(self.addedCat)