]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
VMware: cinder-volume create_session fail at retry
authorJohnson Koil Raj <johnson.raj@hp.com>
Fri, 26 Sep 2014 18:37:47 +0000 (00:07 +0530)
committerJohnson Koil Raj <johnson.raj@hp.com>
Sun, 28 Sep 2014 11:55:39 +0000 (17:25 +0530)
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

index c8056c67567e5d67133ad37ae4a659cd7df52f0d..a3ebe6d1608bc366913723f56883a9f7ee2be352 100644 (file)
@@ -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: