def ebSent(err):
            """
            Called from data transport when there are errors during the
            transfer.
            """
            log.err(err, "Unexpected error received during transfer:")
            if err.check(FTPCmdError):
                return err
            return (CNX_CLOSED_TXFR_ABORTED,)

            Called from data transport when there are errors during the
            transfer.
            
stackoverflow/venv/lib/python3.6/site-packages/twisted/protocols/ftp.py