bug fix in timeout (#70)

This commit is contained in:
Daniel Høyer Iversen 2017-04-22 21:38:02 +02:00 committed by Matthew Garrett
parent d346476e63
commit 19851ed423

View file

@ -274,9 +274,8 @@ class device:
response = self.cs.recvfrom(1024) response = self.cs.recvfrom(1024)
break break
except socket.timeout: except socket.timeout:
if (time.time() - starttime) < self.timeout: if (time.time() - starttime) > self.timeout:
pass raise
raise
return bytearray(response[0]) return bytearray(response[0])