New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sftp.get() fails on files containing '%' when local_is_path is true. #711

jawnb opened this Issue Aug 22, 2012 · 1 comment


None yet
2 participants

jawnb commented Aug 22, 2012

The path interpolation done in on line 118 causes the get() call to break if the filename contains the format string operator (%).

Here's an easy way to reproduce the issue:

def test_case():
    run('mkdir -p /tmp/interpolation_test')
    run('touch /tmp/interpolation_test/%f.txt')
    get('/tmp/interpolation_test', '/tmp')

Raises this:

Fatal error: get() encountered an exception while downloading '/tmp/interpolation_test'

Traceback (most recent call last):
  File "...fabric/", line 552, in get
    result = ftp.get_dir(remote_path, local_path)
  File "...fabric/", line 190, in get_dir
    result.append(self.get(rpath, lpath, True, rremote))
  File "...fabric/", line 118, in get
    local_path = os.path.abspath(local_path % path_vars)
TypeError: float argument required, not dict

This comment has been minimized.


bitprophet commented Aug 27, 2012

Moving to #712

@bitprophet bitprophet closed this Aug 27, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment