Revision: 4099 Author: valhallasw Date: 2007-08-23 16:00:23 +0000 (Thu, 23 Aug 2007)
Log Message: ----------- Catch socket.error in postForm per https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1672346...
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2007-08-23 15:50:02 UTC (rev 4098) +++ trunk/pywikipedia/wikipedia.py 2007-08-23 16:00:23 UTC (rev 4099) @@ -3138,7 +3138,10 @@ body of the response. """ data = self.urlEncode(predata) - return self.postData(address, data, sysop = sysop, useCookie=useCookie) + try: + return self.postData(address, data, sysop = sysop, useCookie=useCookie) + except socket.error, e: + raise ServerError(e)
def postData(self, address, data, contentType = 'application/x-www-form-urlencoded', sysop = False, useCookie=True): """