[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fwd: [Fab-user] How do I handle when something goes wrong
From: |
Jeff Forcier |
Subject: |
Fwd: [Fab-user] How do I handle when something goes wrong |
Date: |
Tue, 7 Jul 2009 14:30:04 -0400 |
Check out the docs for sudo and run:
http://docs.fabfile.org/0.9/api/operations.html
You'll see mention of a "failed" attribute, so you can do stuff like:
def foo():
result = run('whatever')
if result.failed:
abort("ohnoes!")
Best,
Jeff
On Tue, Jul 7, 2009 at 2:25 PM, Matthew Wilson<address@hidden> wrote:
> I'm going to use fabric to tell my remote webservers to pull down some
> updated code and then restart.
>
> If the code pull fails, I don't want to restart. Instead I want to
> know about it so I can figure out what went wrong.
>
> Is there anything in fabric to let me catch status codes from scripts,
> or even better, specify what to do when something blows up>
>
> Matt
>
>
> --
> Matthew Wilson
> address@hidden
> http://tplus1.com
>
>
> _______________________________________________
> Fab-user mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/fab-user
>