From d0e50669d1397ebfd8331b483eabe11f3554efdf Mon Sep 17 00:00:00 2001 From: David Ripton Date: Tue, 28 May 2013 16:21:25 -0400 Subject: Raise exception instances, not exception classes. Raising raw exception classes works, but is old deprecated syntax, and may bite us later. Change-Id: I03f41da267ce5cbfc5ea98c531acc9a9b13e082a --- nova/virt/libvirt/imagebackend.py | 6 +++--- nova/virt/vmwareapi/read_write_util.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'nova/virt') diff --git a/nova/virt/libvirt/imagebackend.py b/nova/virt/libvirt/imagebackend.py index 575ae262e..3d394fb79 100755 --- a/nova/virt/libvirt/imagebackend.py +++ b/nova/virt/libvirt/imagebackend.py @@ -175,13 +175,13 @@ class Image(object): return can_fallocate def snapshot_create(self): - raise NotImplementedError + raise NotImplementedError() def snapshot_extract(self, target, out_format): - raise NotImplementedError + raise NotImplementedError() def snapshot_delete(self): - raise NotImplementedError + raise NotImplementedError() class Raw(Image): diff --git a/nova/virt/vmwareapi/read_write_util.py b/nova/virt/vmwareapi/read_write_util.py index a87b3ed92..c82b96fd9 100644 --- a/nova/virt/vmwareapi/read_write_util.py +++ b/nova/virt/vmwareapi/read_write_util.py @@ -97,15 +97,15 @@ class VMwareHTTPFile(object): def write(self, data): """Write data to the file.""" - raise NotImplementedError + raise NotImplementedError() def read(self, chunk_size): """Read a chunk of data.""" - raise NotImplementedError + raise NotImplementedError() def get_size(self): """Get size of the file to be read.""" - raise NotImplementedError + raise NotImplementedError() class VMwareHTTPWriteFile(VMwareHTTPFile): -- cgit