summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nova/scheduler/host_manager.py12
-rw-r--r--nova/tests/api/openstack/compute/contrib/test_coverage_ext.py2
-rw-r--r--nova/tests/compute/test_compute.py2
-rw-r--r--nova/tests/fake_ldap.py12
-rw-r--r--nova/tests/test_utils.py2
-rwxr-xr-xnova/virt/libvirt/imagebackend.py6
-rw-r--r--nova/virt/vmwareapi/read_write_util.py6
7 files changed, 21 insertions, 21 deletions
diff --git a/nova/scheduler/host_manager.py b/nova/scheduler/host_manager.py
index 9dbe6bd67..b5fbb8594 100644
--- a/nova/scheduler/host_manager.py
+++ b/nova/scheduler/host_manager.py
@@ -66,19 +66,19 @@ class ReadOnlyDict(UserDict.IterableUserDict):
self.update(source)
def __setitem__(self, key, item):
- raise TypeError
+ raise TypeError()
def __delitem__(self, key):
- raise TypeError
+ raise TypeError()
def clear(self):
- raise TypeError
+ raise TypeError()
def pop(self, key, *args):
- raise TypeError
+ raise TypeError()
def popitem(self):
- raise TypeError
+ raise TypeError()
def update(self, source=None):
if source is None:
@@ -88,7 +88,7 @@ class ReadOnlyDict(UserDict.IterableUserDict):
elif isinstance(source, type({})):
self.data = source
else:
- raise TypeError
+ raise TypeError()
class HostState(object):
diff --git a/nova/tests/api/openstack/compute/contrib/test_coverage_ext.py b/nova/tests/api/openstack/compute/contrib/test_coverage_ext.py
index cd4229ddd..957625b34 100644
--- a/nova/tests/api/openstack/compute/contrib/test_coverage_ext.py
+++ b/nova/tests/api/openstack/compute/contrib/test_coverage_ext.py
@@ -47,7 +47,7 @@ class FakeCoverage(object):
def stop(self):
if not self.started:
- raise AssertionError
+ raise AssertionError()
self.started = False
def report(self, file):
diff --git a/nova/tests/compute/test_compute.py b/nova/tests/compute/test_compute.py
index f5c23ccee..38403dd24 100644
--- a/nova/tests/compute/test_compute.py
+++ b/nova/tests/compute/test_compute.py
@@ -7462,7 +7462,7 @@ class ComputeAPITestCase(BaseTestCase):
def fake_libvirt_driver_detach_volume_fails(*args, **kwargs):
called['fake_libvirt_driver_detach_volume_fails'] = True
- raise AttributeError
+ raise AttributeError()
def fake_roll_detaching(*args, **kwargs):
called['fake_roll_detaching'] = True
diff --git a/nova/tests/fake_ldap.py b/nova/tests/fake_ldap.py
index b3fab03ab..7b587ffe2 100644
--- a/nova/tests/fake_ldap.py
+++ b/nova/tests/fake_ldap.py
@@ -217,19 +217,19 @@ class FakeLDAP(object):
def simple_bind_s(self, dn, password):
"""This method is ignored, but provided for compatibility."""
if server_fail:
- raise SERVER_DOWN
+ raise SERVER_DOWN()
pass
def unbind_s(self):
"""This method is ignored, but provided for compatibility."""
if server_fail:
- raise SERVER_DOWN
+ raise SERVER_DOWN()
pass
def add_s(self, dn, attr):
"""Add an object with the specified attributes at dn."""
if server_fail:
- raise SERVER_DOWN
+ raise SERVER_DOWN()
key = "%s%s" % (self.__prefix, dn)
value_dict = dict([(k, _to_json(v)) for k, v in attr])
@@ -238,7 +238,7 @@ class FakeLDAP(object):
def delete_s(self, dn):
"""Remove the ldap object at specified dn."""
if server_fail:
- raise SERVER_DOWN
+ raise SERVER_DOWN()
Store.instance().delete("%s%s" % (self.__prefix, dn))
@@ -252,7 +252,7 @@ class FakeLDAP(object):
"""
if server_fail:
- raise SERVER_DOWN
+ raise SERVER_DOWN()
store = Store.instance()
key = "%s%s" % (self.__prefix, dn)
@@ -292,7 +292,7 @@ class FakeLDAP(object):
"""
if server_fail:
- raise SERVER_DOWN
+ raise SERVER_DOWN()
if scope != SCOPE_BASE and scope != SCOPE_SUBTREE:
raise NotImplementedError(str(scope))
diff --git a/nova/tests/test_utils.py b/nova/tests/test_utils.py
index a2abedda8..f400bb899 100644
--- a/nova/tests/test_utils.py
+++ b/nova/tests/test_utils.py
@@ -325,7 +325,7 @@ class GenericUtilsTestCase(test.TestCase):
def test_read_file_as_root(self):
def fake_execute(*args, **kwargs):
if args[1] == 'bad':
- raise processutils.ProcessExecutionError
+ raise processutils.ProcessExecutionError()
return 'fakecontents', None
self.stubs.Set(utils, 'execute', fake_execute)
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):