Revision: 7941 Author: xqt Date: 2010-02-16 17:07:50 +0000 (Tue, 16 Feb 2010)
Log Message: ----------- Bugfix for #2946258: Test status code. I would prefer going into loop introduced in r5014 but this is old stuff.
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2010-02-16 17:01:39 UTC (rev 7940) +++ trunk/pywikipedia/wikipedia.py 2010-02-16 17:07:50 UTC (rev 7941) @@ -2151,7 +2151,7 @@ return self._putPageOld(text, comment, watchArticle, minorEdit, newPage, token, newToken, sysop, captcha=solve)
# We are expecting a 302 to the action=view page. I'm not sure why this was removed in r5019 - if data.strip() != u"": + if response.status != 302 and data.strip() != u"": # Something went wrong, and we don't know what. Show the # HTML code that hopefully includes some error message. output(u"ERROR: Unexpected response from wiki server.")