Revision: 6776 Author: cosoleto Date: 2009-04-30 12:54:17 +0000 (Thu, 30 Apr 2009)
Log Message: ----------- _GetAll.run: Avoid to search inside the entire XML data when you want to check only the final bytes. Not explicitly suggested by me in bug #2771272.
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2009-04-30 12:27:23 UTC (rev 6775) +++ trunk/pywikipedia/wikipedia.py 2009-04-30 12:54:17 UTC (rev 6776) @@ -2974,7 +2974,7 @@ else: if "<title>Wiki does not exist</title>" in data: raise NoSuchSite(u'Wiki %s does not exist yet' % self.site) - elif "</mediawiki>" not in data: + elif "</mediawiki>" not in data[-20:]: # HTML error Page got thrown because of an internal # error when fetching a revision. output(u'Remote site has a problem, it probably ' \
pywikipedia-svn@lists.wikimedia.org