Don't traceback on reset-by-peer errors

This commit is contained in:
Dan Williams 2006-09-21 17:02:20 -04:00
parent 3c11feca6f
commit 4410ad5056

View File

@ -179,7 +179,15 @@ class GlibXMLRPCTransport(xmlrpclib.Transport):
if not (condition & gobject.IO_IN): if not (condition & gobject.IO_IN):
return True return True
errcode, errmsg, headers = h.getreply() try:
errcode, errmsg, headers = h.getreply()
except socket.error, err:
if err[0] != 104:
raise socket.error(err)
else:
gobject.idle_add(request_cb, RESULT_FAILED, None, user_data)
return False
if errcode != 200: if errcode != 200:
raise xmlrpclib.ProtocolError(host + handler, errcode, errmsg, headers) raise xmlrpclib.ProtocolError(host + handler, errcode, errmsg, headers)
self.verbose = verbose self.verbose = verbose