[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Fab-user] trivial put test case fails?
From: |
Niklas Lindström |
Subject: |
Re: [Fab-user] trivial put test case fails? |
Date: |
Wed, 18 Feb 2009 22:15:10 +0100 |
Hi!
I just ran into this myself. No time to write a patch (afraid my
git-repo is a bit of a mess), but the issue is on line 389:
mode = ftp.lstat(remotepath).st_mode
This fails if the remotepath doesn't exist. It *will* work if you use
the new *great* feature of put: you can supply a directory as the
second argument instead (which as seen breaks the old functionality..
;]).
A *crude* fix would be:
try:
mode = ftp.lstat(remotepath).st_mode
except:
mode = None
While I'm at it, it seems the glob feature (line 393+) can't work
either. On line 391, remotepath is turned from a directory to a file
path by taking the basename of the localpath. Which thus cannot be a
glob pattern? ;)
(Anyway, it was very nice to see a new release with the new stuff in
place! Congrats.)
[Just saw Timothee found that using a directory works. So this is a
bugreport then.. ;)]
Best regards,
Niklas
On Wed, Feb 18, 2009 at 10:03 PM, Timothee Besset <address@hidden> wrote:
> I am trying to run the following test case:
>
> def test_put():
> "Test a file put."
> put( '/home/timo/bar', '/root/bar' )
>
> /home/timo/bar exists on my local system, I am logging in as root into
> the remote host just fine, but the put fails:
>
> $ fab test_put
> Fabric v. 0.1.0.
> Running test_put...
> Logging into the following hosts as root:
> qls16
> Error: The put operation failed on qls16:
> [Errno 2] No such file
>
> Does this functionality expect specific programs installed on the remote
> end maybe?
>
> TTimo
>
>
>
> _______________________________________________
> Fab-user mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/fab-user
>
- [Fab-user] trivial put test case fails?, Timothee Besset, 2009/02/18
- Message not available
- Re: [Fab-user] trivial put test case fails?,
Niklas Lindström <=
- Re: [Fab-user] trivial put test case fails?, Christian Vest Hansen, 2009/02/20
- Re: [Fab-user] trivial put test case fails?, Niklas Lindström, 2009/02/21
- Re: [Fab-user] trivial put test case fails?, Jeff Forcier, 2009/02/21
- Re: [Fab-user] trivial put test case fails?, Christian Vest Hansen, 2009/02/21
- Re: [Fab-user] trivial put test case fails?, Niklas Lindström, 2009/02/22
- Re: [Fab-user] trivial put test case fails?, Jeff Forcier, 2009/02/22
- Re: [Fab-user] trivial put test case fails?, Christian Vest Hansen, 2009/02/22
- Re: [Fab-user] trivial put test case fails?, Christian Vest Hansen, 2009/02/22
- Re: [Fab-user] trivial put test case fails?, Niklas Lindström, 2009/02/23