From: Zhongyue Luo Date: Thu, 31 Jan 2013 02:31:51 +0000 (+0800) Subject: Fixes "is not" usage X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=8960e4d33c73d79778aa02cfed0c7691a3b7e158;p=openstack-build%2Fcinder-build.git Fixes "is not" usage Fixes bug #1110987 Change-Id: Iafa9fc548deaf03c229cc9144d85e6c68b3101be --- diff --git a/cinder/volume/drivers/netapp.py b/cinder/volume/drivers/netapp.py index eb613cb76..1591da055 100644 --- a/cinder/volume/drivers/netapp.py +++ b/cinder/volume/drivers/netapp.py @@ -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 diff --git a/cinder/volume/drivers/san/hp_lefthand.py b/cinder/volume/drivers/san/hp_lefthand.py index f40e64891..05a7c7de7 100644 --- a/cinder/volume/drivers/san/hp_lefthand.py +++ b/cinder/volume/drivers/san/hp_lefthand.py @@ -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