diff options
| author | Jason Koelker <jason@koelker.net> | 2011-04-18 15:53:09 -0500 |
|---|---|---|
| committer | Jason Koelker <jason@koelker.net> | 2011-04-18 15:53:09 -0500 |
| commit | f59f792c83c7f18e48903165df8d3dd78f45dd4c (patch) | |
| tree | cc0ad5359ad5a398883d25c46ba9290b44cf7c61 /nova/virt | |
| parent | b33c81f05ddd5d3ac4e83b796b9675d4f6e56e7d (diff) | |
use 'is not None' instead of '!= None'
Diffstat (limited to 'nova/virt')
| -rw-r--r-- | nova/virt/libvirt_conn.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/nova/virt/libvirt_conn.py b/nova/virt/libvirt_conn.py index 6ec15fbb8..bf5d0c00a 100644 --- a/nova/virt/libvirt_conn.py +++ b/nova/virt/libvirt_conn.py @@ -437,9 +437,9 @@ class LibvirtConnection(driver.ComputeDriver): if child.prop('dev') == device: return str(node) finally: - if ctx != None: + if ctx is not None: ctx.xpathFreeContext() - if doc != None: + if doc is not None: doc.freeDoc() @exception.wrap_exception @@ -1119,9 +1119,9 @@ class LibvirtConnection(driver.ComputeDriver): disks.append(devdst) finally: - if ctx != None: + if ctx is not None: ctx.xpathFreeContext() - if doc != None: + if doc is not None: doc.freeDoc() return disks @@ -1161,9 +1161,9 @@ class LibvirtConnection(driver.ComputeDriver): interfaces.append(devdst) finally: - if ctx != None: + if ctx is not None: ctx.xpathFreeContext() - if doc != None: + if doc is not None: doc.freeDoc() return interfaces |
