[issue16038] ftplib: unlimited readline() from connection

Radu Voicilas report at bugs.python.org
Wed Sep 3 14:20:28 CEST 2014


Radu Voicilas added the comment:

I'm a little confused about this patch. Please correct me if I'm wrong, but fp.readline([size + 1]) should return a line of length at most size + 1. This means that the check len(line) > size will always be true when reading a line that has a length greater than self.maxline. Also, wouldn't it make more sense to have the line that logs stuff in debugging mode be before raising a LineTooLong exception ? This way you have the option of actually seeing the line.

----------
nosy: +raduv

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16038>
_______________________________________


More information about the Python-bugs-list mailing list