fab-user
[Top][All Lists]
Advanced

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

Re: [Fab-user] Execution branch no more (and: creating tests)


From: Niklas Lindström
Subject: Re: [Fab-user] Execution branch no more (and: creating tests)
Date: Tue, 21 Oct 2008 16:24:47 +0200

On Tue, Oct 21, 2008 at 4:05 PM, Christian Vest Hansen
<address@hidden> wrote:
[...]
> Off the top of my head, maybe decorators could all use an fn_env map
> instead of setting their own properties directory on the function
> objects? That way it might be easier to pass these properties through
> in a stacked manner and allow lots of different decorators to play
> nicer with each other?

Good point. But I believe it shouldn't be necessary. Jeff's decorators
return the actual command function, so they play nice already. And I
use @wraps (from the functools module), which copies the function name
and dictionary to make the resulting wrappers play nicely.

Well, apart from their func_code not being the same, which I "fixed"
with the `_wrapped_command` as mentioned. :)

----
Note: I just pushed this unification of the available decorators:

Moved the `requires` and `depends` decorators to the same place as the
helpers `hosts` and `modes`. And registered these last two with
@decorator.
----

Best regards,
Niklas




reply via email to

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