[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Fab-user] api.run: fatal errors versus exceptions
From: |
Jeff Forcier |
Subject: |
Re: [Fab-user] api.run: fatal errors versus exceptions |
Date: |
Thu, 19 Jan 2012 11:15:16 -0800 |
On Thu, Jan 19, 2012 at 10:40 AM, Paul Hoffman <address@hidden> wrote:
> If CmdString doesn't get executed (such as because the target
> machine is down or you use the wrong password), the program aborts
> before the "if ThisRet.failed" is evaluated.
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.)
1.4 also introduces an experimental (for now) setting to force real
exceptions instead of abort()s. Network errors only right now,
everything later.
Thanks,
Jeff
* 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.
--
Jeff Forcier
Unix sysadmin; Python/Ruby engineer
http://bitprophet.org
- [Fab-user] api.run: fatal errors versus exceptions, Paul Hoffman, 2012/01/17
- Re: [Fab-user] api.run: fatal errors versus exceptions, Jeff Forcier, 2012/01/18
- Re: [Fab-user] api.run: fatal errors versus exceptions, Paul Hoffman, 2012/01/18
- Re: [Fab-user] api.run: fatal errors versus exceptions, Steve Hajducko, 2012/01/19
- Re: [Fab-user] api.run: fatal errors versus exceptions, Paul Hoffman, 2012/01/19
- Re: [Fab-user] api.run: fatal errors versus exceptions,
Jeff Forcier <=
- Re: [Fab-user] api.run: fatal errors versus exceptions, Jeff Forcier, 2012/01/19
- Re: [Fab-user] api.run: fatal errors versus exceptions, Paul Hoffman, 2012/01/19
- Re: [Fab-user] api.run: fatal errors versus exceptions, Robert Terhaar, 2012/01/19
- Re: [Fab-user] api.run: fatal errors versus exceptions, Paul Hoffman, 2012/01/19
- Re: [Fab-user] api.run: fatal errors versus exceptions, Jeff Forcier, 2012/01/19
- Re: [Fab-user] api.run: fatal errors versus exceptions, Paul Hoffman, 2012/01/19
- Re: [Fab-user] api.run: fatal errors versus exceptions, Jeff Forcier, 2012/01/19
- Re: [Fab-user] api.run: fatal errors versus exceptions, Paul Hoffman, 2012/01/19