Custom Query (120 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (58 - 60 of 120)

Ticket Resolution Summary Owner Reporter
#66 fixed FTPHost.path.isfile() on nonexistent path raises PermanentError schwa ftputiluser
Description

If you call path.isfile() on a non existent path like so:

from ftputil import FTPHost

SERVER = 'localhost'
USER = ''
PASSWORD = ''

if __name__ == '__main__':

    ftph = FTPHost(SERVER, USER, PASSWORD)
    print ftph.path.isfile('/asd/txt')

a PermanentError? is raised instead of returning False as would be expected from the docstring to isfile:

"A non-existing path does _not_ cause a PermanentError."

The stack trace:

Traceback (most recent call last):
  File "D:\ECLIPSE-WS\ftputilplay\src\ftpup.py", line 10, in <module>
    print ftph.path.isfile('/asd/txt')
  File "D:\TEMP\ftputilvirtpy\lib\site-packages\ftputil\ftp_path.py", line 111, in isfile
    path, _exception_for_missing_path=False)
  File "D:\TEMP\ftputilvirtpy\lib\site-packages\ftputil\__init__.py", line 896, in stat
    return self._stat._stat(path, _exception_for_missing_path)
  File "D:\TEMP\ftputilvirtpy\lib\site-packages\ftputil\ftp_stat.py", line 624, in _stat
    _exception_for_missing_path)
  File "D:\TEMP\ftputilvirtpy\lib\site-packages\ftputil\ftp_stat.py", line 578, in __call_with_parser_retry
    result = method(*args, **kwargs)
  File "D:\TEMP\ftputilvirtpy\lib\site-packages\ftputil\ftp_stat.py", line 543, in _real_stat
    lstat_result = self._real_lstat(path, _exception_for_missing_path)
  File "D:\TEMP\ftputilvirtpy\lib\site-packages\ftputil\ftp_stat.py", line 502, in _real_lstat
    for stat_result in self._stat_results_from_dir(dirname):
  File "D:\TEMP\ftputilvirtpy\lib\site-packages\ftputil\ftp_stat.py", line 419, in _stat_results_from_dir
    lines = self._host_dir(path)
  File "D:\TEMP\ftputilvirtpy\lib\site-packages\ftputil\ftp_stat.py", line 411, in _host_dir
    return self._host._dir(path)
  File "D:\TEMP\ftputilvirtpy\lib\site-packages\ftputil\__init__.py", line 847, in _dir
    descend_deeply=True)
  File "D:\TEMP\ftputilvirtpy\lib\site-packages\ftputil\__init__.py", line 590, in _robust_ftp_command
    self.chdir(path)
  File "D:\TEMP\ftputilvirtpy\lib\site-packages\ftputil\__init__.py", line 615, in chdir
    ftp_error._try_with_oserror(self._session.cwd, path)
  File "D:\TEMP\ftputilvirtpy\lib\site-packages\ftputil\ftp_error.py", line 136, in _try_with_oserror
    raise PermanentError(*exc.args)
ftputil.ftp_error.PermanentError: 550 CWD failed. "/asd": directory not found.
Debugging info: ftputil 2.7.1, Python 2.7.3 (win32)

seems to indicate the _exception_for_missing_path is not carried when calling for stat_result in self._stat_results_from_dir(dirname) in real_lstat, line 502

I've patched around this by catching PermanentErrors? in isfile, but this is a quick and dirty solution and I'm hoping for a cleaner fix in the mainline.

Thx for your nice library!

Mario

#65 fixed Auto-probing of LIST's -a option is faulty (Ticket #23) schwa ftputiluser
Description

My FTP server does not seem to like the -a option but ftplib does not throw an exception which is what ftputil is expecting. The result is that an empty list is returned whenever LIST -a is used.

I made a local fix by commenting out the call to _check_list_a_option in FTPHost.__init__.

#64 fixed 2.7 Package is broken schwa ftputiluser
Description
(Env)alberto@sigym-maverick-mb13:~/src/FTPRelayer$ easy_install "ftputil==2.7"
Searching for ftputil==2.7
Reading http://pypi.python.org/simple/ftputil/
Reading http://ftputil.sschwarzer.net/
Reading http://www.sschwarzer.net/python/python_software.html
Best match: ftputil 2.7
Downloading http://ftputil.sschwarzer.net/trac/attachment/wiki/Download/ftputil-2.7.tar.gz?format=raw
Processing ftputil-2.7.tar.gz
Writing /tmp/easy_install-AZnjtp/ftputil-2.7/setup.cfg
Running ftputil-2.7/setup.py -q bdist_egg --dist-dir /tmp/easy_install-AZnjtp/ftputil-2.7/egg-dist-tmp-SQCcNI
error: Setup script exited with error: can't copy 'doc/README.html': doesn't exist or not a regular file

Version 2.6 installs fine

Note: See TracQuery for help on using queries.