summaryrefslogtreecommitdiffhomepage
path: root/tests/loop.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/loop.py')
-rw-r--r--tests/loop.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/tests/loop.py b/tests/loop.py
index bdc2f2da..91c216d2 100644
--- a/tests/loop.py
+++ b/tests/loop.py
@@ -7,7 +7,7 @@
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
-# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY
+# Paramiko is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
@@ -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 = ''
+ out = self.__in_buffer[:n]
+ self.__in_buffer = self.__in_buffer[n:]
return out
finally:
self.__lock.release()