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<m...@tplus1.com> 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
> m...@tplus1.com
> http://tplus1.com
>
>
> _______________________________________________
> Fab-user mailing list
> Fab-user@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/fab-user
>


_______________________________________________
Fab-user mailing list
Fab-user@nongnu.org
http://lists.nongnu.org/mailman/listinfo/fab-user

Reply via email to