From a28c9709f3e3c820f125aeb18cff8e5d34da013b Mon Sep 17 00:00:00 2001 From: Johnson Koil Raj Date: Sat, 27 Sep 2014 00:07:47 +0530 Subject: [PATCH] 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 --- cinder/volume/drivers/vmware/vim.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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: -- 2.45.2