[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Fab-user] try/except not working as expected.
From: |
Jeff Forcier |
Subject: |
Re: [Fab-user] try/except not working as expected. |
Date: |
Fri, 22 Oct 2010 11:46:48 -0400 |
(Looks like we went off-list at some point, roping it back in...)
Right, I just meant to look at the source code and try to use that as
a guide for whatever you're doing on your own :)
http://github.com/bitprophet/fabric/blob/0.9/fabric/operations.py#L620
However, reboot() should've been included in fabric.api as long as
you're on Fabric 0.9.2.
-Jeff
On Fri, Oct 22, 2010 at 11:32 AM, Jeff Honey <address@hidden> wrote:
> I tried using reboot() but it kept complaining about the function. I'll run
> it again real quick and include the results.
>
> <snip>
> NameError: global name 'reboot' is not defined
> </snip>
>
> ...running from within this parent function:
>
> <snip>
> def redo():
> for host in env.roledefs['test']:
> with settings(host_string=host):
> put('ready.txt','/tmp/')
> reboot()
> </snip>
>
> --
> ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
> ¤ kyoboku kazeoshi ¤
> ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
> ________________________________________
> From: address@hidden address@hidden On Behalf Of Jeff Forcier address@hidden
> Sent: Friday, October 22, 2010 11:12
> To: Jeff Honey
> Subject: Re: [Fab-user] try/except not working as expected.
>
> If this is a host you're rebooting yourself via Fabric, definitely
> check out the code for the builtin reboot() operation, as it (at least
> in my usage) handles the reconnect issue just fine.
--
Jeff Forcier
Unix sysadmin; Python/Ruby developer
http://bitprophet.org