Revision: 6720 Author: russblau Date: 2009-04-25 16:21:08 +0000 (Sat, 25 Apr 2009)
Log Message: ----------- Change order of tests
Modified Paths: -------------- branches/rewrite/pywikibot/comms/http.py
Modified: branches/rewrite/pywikibot/comms/http.py =================================================================== --- branches/rewrite/pywikibot/comms/http.py 2009-04-25 15:47:36 UTC (rev 6719) +++ branches/rewrite/pywikibot/comms/http.py 2009-04-25 16:21:08 UTC (rev 6720) @@ -99,13 +99,13 @@ request.lock.acquire()
#TODO: do some error correcting stuff - if request.data[0].status == 504: - raise Server504Error("Server %s timed out" % site.hostname()) - #if all else fails if isinstance(request.data, Exception): raise request.data
+ if request.data[0].status == 504: + raise Server504Error("Server %s timed out" % site.hostname()) + if request.data[0].status != 200: pywikibot.output(u"Http response status %(status)s" % {'status': request.data[0].status},
pywikipedia-svn@lists.wikimedia.org