Ignore:
Timestamp:
Dec 23, 2015, 5:10:41 PM (4 years ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Message:
Add `rest` argument to `FTPHost.open`

Allow a `rest` argument in `FTPHost.open`. Pass this on to
`FTPFile._open` and from there to `self._session.transfercmd`.

So far there's no error handling.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ftputil/file.py

    r1611 r1618  
    4242
    4343    def _open(self, path, mode, buffering=None, encoding=None, errors=None,
    44               newline=None):
     44              newline=None, rest=None):
    4545        """
    4646        Open the remote file with given path name and mode.
     
    9090        # Get connection and file object.
    9191        with ftputil.error.ftplib_error_to_ftp_io_error:
    92             self._conn = self._session.transfercmd(command)
     92            self._conn = self._session.transfercmd(command, rest)
    9393        # The file object. Under Python 3, this will already be a
    9494        # `BufferedReader` or `BufferedWriter` object.
Note: See TracChangeset for help on using the changeset viewer.