Merge pull request #13 from bobbyi/test_loop
Remove comparison between int and str
This commit is contained in:
commit
43ddbb0265
|
@ -62,12 +62,8 @@ class LoopSocket (object):
|
|||
self.__cv.wait(self.__timeout)
|
||||
if len(self.__in_buffer) == 0:
|
||||
raise socket.timeout
|
||||
if n < self.__in_buffer:
|
||||
out = self.__in_buffer[:n]
|
||||
self.__in_buffer = self.__in_buffer[n:]
|
||||
else:
|
||||
out = self.__in_buffer
|
||||
self.__in_buffer = ''
|
||||
return out
|
||||
finally:
|
||||
self.__lock.release()
|
||||
|
|
Loading…
Reference in New Issue