FTPHandler.ftp_PASS.auth_failed(): wrapped self._closed in an hasattr() statement to avoid ValueError in case the channel has been closed and the attribute is no more available.
FTPHandler.ftp_PASS.auth_failed(): wrapped self._closed in an hasattr() statement to avoid ValueError in case the channel has been closed and the attribute is no more available.

giampaolo/pyftpdlib