Fix for issue 75 - _FTPFile.read() was asserting when given a negative size

parent 1dff2240
...@@ -651,7 +651,7 @@ class _FTPFile(object): ...@@ -651,7 +651,7 @@ class _FTPFile(object):
return '' return ''
chunks = [] chunks = []
if size is None: if size is None or size < 0:
while 1: while 1:
data = self.conn.recv(self.blocksize) data = self.conn.recv(self.blocksize)
if not data: if not data:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment