mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-03-26 21:43:02 +00:00
Fix non existing attribuites in SDK exception
SDK exception may not have extra_data, details or response attributes. Print None in this case. Change-Id: Ic4073c28a4e4afb8ca5d2b72c4ea8582da244af1
This commit is contained in:
@@ -392,9 +392,10 @@ class OpenStackModule:
|
||||
params = {
|
||||
'msg': str(e),
|
||||
'extra_data': {
|
||||
'data': e.extra_data,
|
||||
'details': e.details,
|
||||
'response': e.response.text
|
||||
'data': getattr(e, 'extra_data', 'None'),
|
||||
'details': getattr(e, 'details', 'None'),
|
||||
'response': getattr(getattr(e, 'response', ''),
|
||||
'text', 'None')
|
||||
}
|
||||
}
|
||||
self.ansible.fail_json(**params)
|
||||
|
||||
Reference in New Issue
Block a user