Revision: 4554 Author: rotem Date: 2007-11-15 11:29:36 +0000 (Thu, 15 Nov 2007)
Log Message: ----------- Properly find Wikimedia errors (Windows newlines may be used).
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2007-11-15 11:22:04 UTC (rev 4553) +++ trunk/pywikipedia/wikipedia.py 2007-11-15 11:29:36 UTC (rev 4554) @@ -1259,8 +1259,7 @@ output(u"Pausing 5 seconds due to database server lag.") time.sleep(5) continue - if data.startswith( - "<html>\n<head>\n<title>Wikimedia Error</title>"): + if data.find( "<title>Wikimedia Error</title>"): output( u"Wikimedia has technical problems; will retry in %i minutes." % retry_delay)