From: Johnson Koil Raj Date: Fri, 26 Sep 2014 18:37:47 +0000 (+0530) Subject: VMware: cinder-volume create_session fail at retry X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=a28c9709f3e3c820f125aeb18cff8e5d34da013b;p=openstack-build%2Fcinder-build.git VMware: cinder-volume create_session fail at retry cinder-volume exits with an exception while accessing a None object during retry of create session failure. Closes-Bug: #1374585 Change-Id: I1d8dd034e9c6eb7568cf6f243a203df7de1777da --- diff --git a/cinder/volume/drivers/vmware/vim.py b/cinder/volume/drivers/vmware/vim.py index c8056c675..a3ebe6d16 100644 --- a/cinder/volume/drivers/vmware/vim.py +++ b/cinder/volume/drivers/vmware/vim.py @@ -176,8 +176,9 @@ class Vim(object): doc = excep.document detail = doc.childAtPath('/Envelope/Body/Fault/detail') fault_list = [] - for child in detail.getChildren(): - fault_list.append(child.get('type')) + if detail is not None: + for child in detail.getChildren(): + fault_list.append(child.get('type')) raise error_util.VimFaultException(fault_list, excep) except AttributeError as excep: