Correct, no exceptions, just the literal $(fab_host).
I'm very new to fabric and could easily be wrong but...
I'm reading through the source, and I don't think I see any way that abort
could be called with fab_host defined. It would have to be called from
inside a function that connects right? And your functions just print to
output, they don't use the abort function. Is there a function in userspace
that would leave fab_host defined? If not, you might not even need to check.

Alex



On Wed, Feb 18, 2009 at 2:37 PM, Jeff Forcier <[email protected]> wrote:

> Well, the core problem here is that if you're calling abort() in a
> situation where you haven't connected to a host, then naturally
> config.fab_host will be undefined.
>
> It should be relatively simple to update abort() so that it checks for
> this use case and simply omits the fab_host part of the output if
> there's no actual connection.
>
> I'll make a note of this so that it gets done at some point. I assume
> you're not getting any actual exceptions, right? Just that it prints
> out a literal "[$(fab_host)]"?
>
> -Jeff
>
> On Wed, Feb 18, 2009 at 3:22 PM, Alex Robbins
> <[email protected]> wrote:
> > I guess a workaround would be to set config.fab_host to whatever you want
> > before calling abort, it won't matter since we are about to exit anyway.
> >
> > On Wed, Feb 18, 2009 at 2:17 PM, Alex Robbins
> > <[email protected]> wrote:
> >>
> >> The abort function looks like just what I need for a project. However,
> it
> >> calls
> >> _lazy_format('[$(fab_host)] Error: %s' % msg, ENV)
> >> This prints out without doing the lazy_formatting. abort doesn't have
> the
> >> connects decorator, so I don't think fab_host will ever be defined in
> the
> >> ENV. Maybe that should be changed to [localhost]? (Or give people the
> option
> >> to specify the host that we should abort for? Probably not helpful.)
> >> Thanks!
> >> Alex
> >
> > _______________________________________________
> > Fab-user mailing list
> > [email protected]
> > http://lists.nongnu.org/mailman/listinfo/fab-user
> >
> >
>
_______________________________________________
Fab-user mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/fab-user

Reply via email to