fab-user
[Top][All Lists]
Advanced

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

Re: [Fab-user] Best way of making proposals for Fabric?


From: Kevin Horn
Subject: Re: [Fab-user] Best way of making proposals for Fabric?
Date: Thu, 3 Mar 2011 15:01:01 -0600

On Wed, Mar 2, 2011 at 5:17 PM, Travis Swicegood <address@hidden> wrote:
Doh - this went directly to Roy, not the entire list.  Here it is for anyone who's interested...

---------- Forwarded message ----------
From: Travis Swicegood <address@hidden>
Date: Wed, Mar 2, 2011 at 5:16 PM
Subject: Re: [Fab-user] Best way of making proposals for Fabric?
To: Rory Campbell-Lange <address@hidden>


On Wed, Mar 2, 2011 at 1:41 PM, Rory Campbell-Lange <address@hidden> wrote:
3. setup and teardown

Just as a thought, have you considered moving the logic into decorators?  They essentially provide setup/teardown functionality in that you can controll when the decorated function is executed.  That leads to very readable code:

   address@hidden(source, destination)
    def my_awesomeness():
        # some really awesome task code

Doesn't change that it'd be cool for tunneling to be exposed inside Fabric.  Maybe it should be a decorator.

-T



Might also be good candidate for a  context manager:

    with ssh_tunnel(params):
        ...do stuff...

Kevin Horn

reply via email to

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