Revision: 5803 Author: nicdumz Date: 2008-08-17 14:39:50 +0000 (Sun, 17 Aug 2008)
Log Message: ----------- Fixing bug "spamprotectiontitle eq antispam label => SpamfilterError"
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2008-08-17 07:40:05 UTC (rev 5802) +++ trunk/pywikipedia/wikipedia.py 2008-08-17 14:39:50 UTC (rev 5803) @@ -1396,6 +1396,9 @@ # A second text area means that an edit conflict has occured. if 'id='wpTextbox2' name="wpTextbox2"' in data: raise EditConflict(u'An edit conflict has occured.') + + # remove the wpAntispam keyword before checking for Spamfilter + data = re.sub(u'(?s)<label for="wpAntispam">.*?</label>', '', data) if self.site().has_mediawiki_message("spamprotectiontitle")\ and self.site().mediawiki_message('spamprotectiontitle') in data: try: