The documentation doesn't mention the `EOFError` that https://github.com/python/cpython/blob/master/Lib/ftplib.py#L66 includes
The set of all exceptions (as a tuple) that methods of :class:`FTP`
instances may raise as a result of problems with the FTP connection (as
opposed to programming errors made by the caller). This set includes the
- four exceptions listed above as well as :exc:`OSError`.
+ four exceptions listed above as well as :exc:`OSError` and :exc:`EOFError`.
.. seealso::