Merge "Fixes "is not" usage"

This commit is contained in:
Jenkins 2013-01-31 06:38:57 +00:00 committed by Gerrit Code Review
commit f84b5a3158
2 changed files with 3 additions and 3 deletions
cinder/volume/drivers

@ -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

@ -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