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: Wed, 18 Jan 2012 18:01:33 -0800

On Wed, Jan 18, 2012 at 10:50 AM, Jeff Forcier <address@hidden> wrote:
> Hey Paul,
>
> Is the tutorial not clear enough on this topic? :)
>
>    http://docs.fabfile.org/en/1.3.3/tutorial.html#failure

It is clear enough once I figured out the exception. For the record, I
was using:
                try:
                        ThisRet = fabric.api.run(CmdString)
                except Exception as e:
Because Fabric is aborting, "Exception" doesn't catch it. It works
when I change it to:
                try:
                        ThisRet = fabric.api.run(CmdString)
                except BaseException as e:

--Paul Hoffman



reply via email to

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