Ignore:
Timestamp:
Aug 3, 2013, 9:32:58 PM (6 years ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Message:
Changed calls of `FTPHost.file` to `FTPHost.open`.

Since `file` is no longer in Python 3's global namespace, I also
decided to drop it and make `open` the way to create a file object.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ftputil/host.py

    r1318 r1319  
    4040    #
    4141    #   host = FTPHost(ftp_server, user, password)
    42     #   f = host.file('index.html')
     42    #   f = host.open('index.html')
    4343    #   host.getcwd()   # would block!
    4444    #
     
    195195        return host._file
    196196
    197     file = open
    198 
    199197    def close(self):
    200198        """Close host connection."""
     
    351349        try:
    352350            # May raise `FTPIOError` if directory isn't writable.
    353             file_ = self.file(helper_file_name, 'w')
     351            file_ = self.open(helper_file_name, 'w')
    354352            file_.close()
    355353        except ftputil.error.FTPIOError:
Note: See TracChangeset for help on using the changeset viewer.