From c2b38a1fb8cc7b41d1385027b8bf3c52abd02fda Mon Sep 17 00:00:00 2001 From: Robey Pointer Date: Tue, 22 Aug 2006 19:56:10 -0700 Subject: [PATCH] [project @ robey@lag.net-20060823025610-adee7f6d9bd92725] ok, ok, switch back to open() --- paramiko/sftp_client.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py index e4f0d7c..b31a1b4 100644 --- a/paramiko/sftp_client.py +++ b/paramiko/sftp_client.py @@ -169,7 +169,7 @@ class SFTPClient (BaseSFTP): self._request(CMD_CLOSE, handle) return filelist - def file(self, filename, mode='r', bufsize=-1): + def open(self, filename, mode='r', bufsize=-1): """ Open a file on the remote server. The arguments are the same as for python's built-in C{file} (aka C{open}). A file-like object is @@ -225,9 +225,8 @@ class SFTPClient (BaseSFTP): self._log(DEBUG, 'open(%r, %r) -> %s' % (filename, mode, hexlify(handle))) return SFTPFile(self, handle, mode, bufsize) - # python has migrated toward file() instead of open(). - # and really, that's more easily identifiable. - open = file + # python continues to vacillate about "open" vs "file"... + file = open def remove(self, path): """