Another potential fix for issue 109; now catches WebFault
This commit is contained in:
parent
c0fbdc3316
commit
a7e1f86b8b
1 changed files with 3 additions and 3 deletions
|
@ -105,7 +105,7 @@ EXAMPLES = '''
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import bigsuds
|
import bigsuds
|
||||||
from suds import MethodNotFound
|
from suds import MethodNotFound, WebFault
|
||||||
except ImportError:
|
except ImportError:
|
||||||
bigsuds_found = False
|
bigsuds_found = False
|
||||||
else:
|
else:
|
||||||
|
@ -1364,7 +1364,7 @@ def generate_dict(api_obj, fields):
|
||||||
for field in fields:
|
for field in fields:
|
||||||
try:
|
try:
|
||||||
api_response = getattr(api_obj, "get_" + field)()
|
api_response = getattr(api_obj, "get_" + field)()
|
||||||
except MethodNotFound:
|
except (MethodNotFound, WebFault):
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
lists.append(api_response)
|
lists.append(api_response)
|
||||||
|
@ -1380,7 +1380,7 @@ def generate_simple_dict(api_obj, fields):
|
||||||
for field in fields:
|
for field in fields:
|
||||||
try:
|
try:
|
||||||
api_response = getattr(api_obj, "get_" + field)()
|
api_response = getattr(api_obj, "get_" + field)()
|
||||||
except MethodNotFound:
|
except (MethodNotFound, WebFault):
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
result_dict[field] = api_response
|
result_dict[field] = api_response
|
||||||
|
|
Loading…
Reference in a new issue