fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] Cannot change directory with a variable (worked with 0.9.


From: Ronan Amicel
Subject: Re: [Fab-user] Cannot change directory with a variable (worked with 0.9.x)
Date: Tue, 2 Aug 2011 23:45:02 +0200

Hi Sebastien,

On Tue, Aug 2, 2011 at 10:41, Sebastien Douche <address@hidden> wrote:

----------
list = run('ls -1 %s' % path).split('\n')
for repos in list:
    url = "" repos)
    print "url: %s" % url
    with cd(url):
        run('ls')
----------

I could reproduce the problem.

Looks like there is a stray '\r' at the end of each of your "url", which causes mayhem.

It's fixed by using str.split('\r\n'), or (probably better) str.splitlines().

--
Ronan Amicel
http://topixtream.com/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]