Skip to content
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

Fix check destination is a directory #1244

Closed
wants to merge 1 commit into from
Closed

Fix check destination is a directory #1244

wants to merge 1 commit into from

Conversation

dongweiming
Copy link

it's a fabfile.py:

from fabric.contrib.files import upload_template

context = {
    'name': 'oscarmlage',
}

def update_temp():
    upload_template(filename='xmas.conf',
                    destination='/home/vagrant/test/tmp/',
                    context=context,
                    template_dir='.',
                    use_jinja=True)

when i execute it at freebsd:

test  fab -H localhost update_temp --colorize-errors 
[localhost] Executing task 'update_temp'
[localhost] put: <file obj> -> /home/vagrant/test/tmp/

Fatal error: put() encountered an exception while uploading '<StringIO.StringIO instance at 0x804415f80>'

Underlying exception:
    Failure

Aborting.
Disconnecting from localhost... done.
put() encountered an exception while uploading '<StringIO.StringIO instance at 0x804415f80>'

Underlying exception:
    Failuretest  ipython
In [1]: import os

In [2]: os.path.isdir('/home/vagrant/test/tmp/')
Out[2]: True

@bitprophet
Copy link
Member

Why are you removing code that was clearly put in on purpose? :( It's not cool to "fix" one problem by breaking others.

Can you figure out why the 'echo' expansion isn't working in your case? That should be the real focus here. It's necessary to support things like tildes and other shell expansion so we cannot just get rid of it.

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

Successfully merging this pull request may close these issues.

None yet

2 participants