Ignore:
Timestamp:
Jul 28, 2013, 4:06:29 PM (6 years ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Message:
Added tests for string type handling for `chdir` and `listdir`.

TODO: A bytes argument for `listdir` doesn't work yet.

TODO: String type tests for `path.join` and `path.split*`.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ftputil/host.py

    r1278 r1284  
    576576    def chdir(self, path):
    577577        """Change the directory on the host."""
    578         # Fail early if we get a unicode path which can't be encoded.
    579         path = str(path)
     578        path = ftputil.tool.as_bytes(path)
    580579        with ftputil.error.ftplib_error_to_ftp_os_error:
    581580            self._session.cwd(path)
Note: See TracChangeset for help on using the changeset viewer.