diff options
Diffstat (limited to 'paramiko/sftp_file.py')
-rw-r--r-- | paramiko/sftp_file.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/paramiko/sftp_file.py b/paramiko/sftp_file.py index 51c7d078..a359510a 100644 --- a/paramiko/sftp_file.py +++ b/paramiko/sftp_file.py @@ -41,6 +41,9 @@ class SFTPFile (BufferedFile): self.handle = handle BufferedFile._set_mode(self, mode, bufsize) + def __del__(self): + self.close() + def close(self): BufferedFile.close(self) try: |