From d4b996203ab327f7420b17465e75552c817a2a61 Mon Sep 17 00:00:00 2001 From: Matt Hite Date: Sat, 21 Feb 2015 11:29:35 -0800 Subject: [PATCH] Another potential fix for issue 109; now catches WebFault --- lib/ansible/modules/extras/network/f5/bigip_facts.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ansible/modules/extras/network/f5/bigip_facts.py b/lib/ansible/modules/extras/network/f5/bigip_facts.py index 99a1e31de68..2c333e58fba 100755 --- a/lib/ansible/modules/extras/network/f5/bigip_facts.py +++ b/lib/ansible/modules/extras/network/f5/bigip_facts.py @@ -105,7 +105,7 @@ EXAMPLES = ''' try: import bigsuds - from suds import MethodNotFound + from suds import MethodNotFound, WebFault except ImportError: bigsuds_found = False else: @@ -1364,7 +1364,7 @@ def generate_dict(api_obj, fields): for field in fields: try: api_response = getattr(api_obj, "get_" + field)() - except MethodNotFound: + except (MethodNotFound, WebFault): pass else: lists.append(api_response) @@ -1380,7 +1380,7 @@ def generate_simple_dict(api_obj, fields): for field in fields: try: api_response = getattr(api_obj, "get_" + field)() - except MethodNotFound: + except (MethodNotFound, WebFault): pass else: result_dict[field] = api_response