fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fab-user] warn_only with fatal host errors


From: Chris Henry
Subject: [Fab-user] warn_only with fatal host errors
Date: Fri, 29 Jul 2011 17:50:08 -0700

So far with all of my fabric code I’ve been able to wrap any everything I didn’t want to end my script via:

with settings(warn_only=True):

                do pythonic something here

 

however this seems to still fail and not purely warn if it is unable to connect to a host.  Ie: No route to host, invalid DNS name, etc. 

 

Is there any way to keep fabric from exiting out on this and letting me continue?  Not of the other settings in env seem to be related to exit behavior

 

Examples:

 

Invalid hostname:

 

In [12]: env['host_string']='someinvalidhost.mydomain.blah'

In [13]: with settings(warn_only=True):

    run("ls")

   ....:    

   ....:     

[someinvalidhost.mydomain.blah] run: ls

 

Fatal error: Name lookup failed for someinvalidhost.mydomain.blah

 

Aborting.

---------------------------------------------------------------------------

SystemExit                                Traceback (most recent call last)

 

 

No Route to host:

 

In [18]: env['host_string']='10.1.1.1'

In [19]: with settings(warn_only=True):

    run("help")

   ....:    

   ....:    

[10.21.1.200] run: help

 

Fatal error: Low level socket error connecting to host 10.21.1.200: No route to host

 

Aborting.

---------------------------------------------------------------------------

SystemExit                                Traceback (most recent call last)

 

-Chris H

 

Description: AudienceScience


Chris Henry | Operations Manager | AudienceScience
Phone | 425.201.3874
Fax | 425.201.3877
Email | address@hidden
Website | www.AudienceScience.com

We have moved! Please make note of our new address.
1120 112th Avenue NE | Suite 400 | Bellevue, WA 98004 | United States

France • Germany • India • Italy • Japan • Netherlands • United Kingdom • United States

Learn Why AudienceScience Is The Leader In Audience Targeting
www.AudienceScience.com

Check out our NEW AudienceScience Market Intelligence Report
Audience Targeting Platforms: The Missing Piece in the Online Ecosystem

 

 


reply via email to

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