Raised default timeout from 100 to 1000ms as operations on storage card were occassionally timing out

This commit is contained in:
Kovid Goyal 2006-11-21 23:57:20 +00:00
parent e3a9bfc265
commit f31caad22a

View File

@ -273,7 +273,7 @@ class PRS500Device(object):
self.handle.releaseInterface() self.handle.releaseInterface()
self.handle, self.device = None, None self.handle, self.device = None, None
def _send_command(self, command, response_type=Response, timeout=100): def _send_command(self, command, response_type=Response, timeout=1000):
""" """
Send L{command<Command>} to device and return its L{response<Response>}. Send L{command<Command>} to device and return its L{response<Response>}.
@ -289,7 +289,7 @@ class PRS500Device(object):
if self._log_packets: _log_packet(response, "Response") if self._log_packets: _log_packet(response, "Response")
return response return response
def _send_validated_command(self, command, cnumber=None, response_type=Response, timeout=100): def _send_validated_command(self, command, cnumber=None, response_type=Response, timeout=1000):
""" """
Wrapper around L{_send_command} that checks if the C{Response.rnumber == cnumber or command.number if cnumber==None}. Also check that Wrapper around L{_send_command} that checks if the C{Response.rnumber == cnumber or command.number if cnumber==None}. Also check that
C{Response.type == Command.type}. C{Response.type == Command.type}.