Closed averges closed 7 years ago
Running a script like that socket connection remains opened after calling close() method:
try: path = '/invalid/path' remote = FtpTarget(path, host, port, username, password, tls, timeout) remote.open() except RuntimeError as e: remote.close()
Connected flag is set after change directory is done so if anything goes wrong between connecting to the ftp server and changing directory to root_dir, ftp socket remains opened even when calling close() method.
Thanks for contributing
Running a script like that socket connection remains opened after calling close() method:
Connected flag is set after change directory is done so if anything goes wrong between connecting to the ftp server and changing directory to root_dir, ftp socket remains opened even when calling close() method.