ldtp / ldtp2

Linux Desktop Testing Project
GNU Lesser General Public License v2.1
108 stars 49 forks source link

Stability issues of ldtp client: get httplib.CannotSendRequest or httplib.ResponseNotReady exceptions during long running #18

Open truan-wang opened 8 years ago

truan-wang commented 8 years ago
I got a fix as bellow in /ldtp/client.py: add 196-200 line.
I am not sure it's a good solution, just report here, if anyone else got same issues, just try this fix.

196             except httplib.CannotSendRequest:
197                 if hasattr(self, 'close'):
198                     self.close()
199             except httplib.ResponseNotReady:
200                 pass
201             except xmlrpclib.Fault as e:
202                 if hasattr(self, 'close'):
203                     self.close()
204                 if e.faultCode == ERROR_CODE:
205                     raise LdtpExecutionError(e.faultString.encode('utf-8'))
206                 else:
207                     raise e