Revision: 5043 Author: rotem Date: 2008-02-18 06:19:19 +0000 (Mon, 18 Feb 2008)
Log Message: ----------- (bug 1895795) Avoid token alerts in pages which cannot be edited.
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2008-02-17 17:40:08 UTC (rev 5042) +++ trunk/pywikipedia/wikipedia.py 2008-02-18 06:19:19 UTC (rev 5043) @@ -4226,7 +4226,9 @@ # Token not found # Possible reason for this is the user is blocked, don't show a # warning in this case, otherwise do show a warning - if not self._isBlocked[index]: + # Another possible reason is that the page cannot be edited - ensure + # there is a textarea + if u'<textarea' in text and not self._isBlocked[index]: # Token not found output(u'WARNING: Token not found on %s. You will not be able to edit any page.' % self)