diff options
author | Jenkins <jenkins@review.openstack.org> | 2014-09-28 04:37:43 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2014-09-28 04:37:43 +0000 |
commit | ada2a7b20a5f9014e40a0e00d4a8020d57a4c0e4 (patch) | |
tree | d5394417151997d5a47c257dd87be17933da4801 | |
parent | 1c8e851887519f141e5b3971e06d4e9468fb8b1b (diff) | |
parent | 1c2987bc4cb19fd53299abb8783763042348a768 (diff) | |
download | oslo-vmware-ada2a7b20a5f9014e40a0e00d4a8020d57a4c0e4.tar.gz |
Merge "getText can be called only when doc is not None"
-rw-r--r-- | oslo/vmware/service.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/oslo/vmware/service.py b/oslo/vmware/service.py index b791533..25ff663 100644 --- a/oslo/vmware/service.py +++ b/oslo/vmware/service.py @@ -235,9 +235,10 @@ class Service(object): except suds.WebFault as excep: doc = excep.document - fault_string = doc.childAtPath("/Envelope/Body/Fault/" - "faultstring").getText() - detail = doc.childAtPath('/Envelope/Body/Fault/detail') + if doc is not None: + fault_string = doc.childAtPath("/Envelope/Body/Fault/" + "faultstring").getText() + detail = doc.childAtPath('/Envelope/Body/Fault/detail') fault_list = [] details = {} if detail: |