Revision: 7782 Author: xqt Date: 2009-12-17 07:50:12 +0000 (Thu, 17 Dec 2009)
Log Message: ----------- handle 504 gateway timeout during postData processing
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2009-12-16 21:46:01 UTC (rev 7781) +++ trunk/pywikipedia/wikipedia.py 2009-12-17 07:50:12 UTC (rev 7782) @@ -5803,7 +5803,7 @@ if e.code in [401, 404]: raise PageNotFound(u'Page %s could not be retrieved. Check your family file ?' % url) # just check for HTTP Status 500 (Internal Server Error)? - elif e.code == 500: + elif e.code in [500, 504]: output(u'HTTPError: %s %s' % (e.code, e.msg)) if config.retry_on_fail: output(u"""WARNING: Could not open '%s'.\nMaybe the server is down. Retrying in %i minutes..."""
pywikipedia-svn@lists.wikimedia.org