diff options
| author | David Ripton <dripton@redhat.com> | 2013-05-28 16:21:25 -0400 |
|---|---|---|
| committer | David Ripton <dripton@redhat.com> | 2013-05-28 21:28:33 -0400 |
| commit | d0e50669d1397ebfd8331b483eabe11f3554efdf (patch) | |
| tree | 9946a2cb71330cfd38374c42fe3b17cd8a7c193b /nova/virt | |
| parent | a081faa41887a28d775f7cf6e85484ed0420ced0 (diff) | |
| download | nova-d0e50669d1397ebfd8331b483eabe11f3554efdf.tar.gz nova-d0e50669d1397ebfd8331b483eabe11f3554efdf.tar.xz nova-d0e50669d1397ebfd8331b483eabe11f3554efdf.zip | |
Raise exception instances, not exception classes.
Raising raw exception classes works, but is old deprecated syntax, and
may bite us later.
Change-Id: I03f41da267ce5cbfc5ea98c531acc9a9b13e082a
Diffstat (limited to 'nova/virt')
| -rwxr-xr-x | nova/virt/libvirt/imagebackend.py | 6 | ||||
| -rw-r--r-- | nova/virt/vmwareapi/read_write_util.py | 6 |
2 files changed, 6 insertions, 6 deletions
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): |
