[Pywikipedia-l] SVN: [5352] trunk/pywikipedia/wikipedia.py
nicdumz at svn.wikimedia.org
nicdumz at svn.wikimedia.org
Sat May 10 23:52:52 UTC 2008
Revision: 5352
Author: nicdumz
Date: 2008-05-10 23:52:52 +0000 (Sat, 10 May 2008)
Log Message:
-----------
Hm. An error 500 from the server was not triggering *anything* (partly because in this case no data is being sent back to us). Fixing that.
Modified Paths:
--------------
trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py 2008-05-10 19:39:59 UTC (rev 5351)
+++ trunk/pywikipedia/wikipedia.py 2008-05-10 23:52:52 UTC (rev 5352)
@@ -1401,7 +1401,8 @@
# I think the error message title was changed from "Wikimedia Error"
# to "Wikipedia has a problem", but I'm not sure. Maybe we could
# just check for HTTP Status 500 (Internal Server Error)?
- if "<title>Wikimedia Error</title>" in data or "has a problem</title>" in data:
+ if ("<title>Wikimedia Error</title>" in data or "has a problem</title>" in data) \:
+ or response.status == 500:
output(
u"Wikimedia has technical problems; will retry in %i minute%s."
% (retry_delay, retry_delay != 1 and "s" or ""))
More information about the Pywikipedia-l
mailing list