fab-user
[Top][All Lists]
Advanced

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

Re: [Fab-user] api.run: fatal errors versus exceptions


From: Paul Hoffman
Subject: Re: [Fab-user] api.run: fatal errors versus exceptions
Date: Thu, 19 Jan 2012 12:21:38 -0800

On Thu, Jan 19, 2012 at 11:15 AM, Jeff Forcier <address@hidden> wrote:
> We currently separate "failure" into two buckets: command execution
> failure, and connection failure. The former has been handled with
> warn_only for some time now, as mentioned.
>
> However, as of Fabric 1.3, there's no way to "skip over" connection
> failures save by trapping BaseException* or SystemExit specifically.
> Fabric 1.4 (out by EOM) will include a "skip bad hosts" option
> (already in master.)

Yay! I will happily refactor my code when 1.4 is out.

> 1.4 also introduces an experimental (for now) setting to force real
> exceptions instead of abort()s. Network errors only right now,
> everything later.

That would be wonderful, and "everything" would be even moreso.

> * The reason your Exception trap didn't work is because of
> http://docs.python.org/library/exceptions.html#exceptions.Exception --
> SystemExit only inherits from BaseException, not Exception. A common
> and IMO annoying pitfall.

I guess "common" makes me feel a bit better. :-) Annoying, definitely,
because it is hard to debug unless you remember that Fabric really is
aborting.

--Paul Hoffman



reply via email to

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