From 8960e4d33c73d79778aa02cfed0c7691a3b7e158 Mon Sep 17 00:00:00 2001 From: Zhongyue Luo Date: Thu, 31 Jan 2013 10:31:51 +0800 Subject: [PATCH] Fixes "is not" usage Fixes bug #1110987 Change-Id: Iafa9fc548deaf03c229cc9144d85e6c68b3101be --- cinder/volume/drivers/netapp.py | 2 +- cinder/volume/drivers/san/hp_lefthand.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 -- 2.45.2