]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fixes "is not" usage
authorZhongyue Luo <zhongyue.nah@intel.com>
Thu, 31 Jan 2013 02:31:51 +0000 (10:31 +0800)
committerZhongyue Luo <zhongyue.nah@intel.com>
Thu, 31 Jan 2013 03:15:31 +0000 (11:15 +0800)
Fixes bug #1110987

Change-Id: Iafa9fc548deaf03c229cc9144d85e6c68b3101be

cinder/volume/drivers/netapp.py
cinder/volume/drivers/san/hp_lefthand.py

index eb613cb76bd8b6d3d6b9c08ad453301cebf6126c..1591da055b8924cc70326c7afd024cf83e32bc91 100644 (file)
@@ -548,7 +548,7 @@ class NetAppISCSIDriver(driver.ISCSIDriver):
         is empty. This is necessary because the API proxy produces nasty
         looking XML.
         """
-        if not type(elem) is list:
+        if type(elem) is not list:
             return True
         if 0 == len(elem):
             return True
index f40e648918afa39e0cb479df1fc08d3aa813eee6..05a7c7de79f2ee05dc0640f7765dc71eab0153c3 100644 (file)
@@ -159,13 +159,13 @@ class HpSanISCSIDriver(SanISCSIDriver):
             volume_attributes["volume." + k] = v
 
         status_node = volume_node.find("status")
-        if not status_node is None:
+        if status_node is not None:
             for k, v in status_node.attrib.items():
                 volume_attributes["status." + k] = v
 
         # We only consider the first permission node
         permission_node = volume_node.find("permission")
-        if not permission_node is None:
+        if permission_node is not None:
             for k, v in status_node.attrib.items():
                 volume_attributes["permission." + k] = v