ok, ok, switch back to open()
This commit is contained in:
Robey Pointer 2006-08-22 19:56:10 -07:00
parent 145ceab54c
commit c2b38a1fb8
1 changed files with 3 additions and 4 deletions

View File

@ -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):
"""