summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-06-30 11:55:42 +0000
committerGerrit Code Review <review@openstack.org>2017-06-30 11:55:42 +0000
commit53e55938d97a4a26be218b709d32a1a251328225 (patch)
tree39895e5369872b372b9be6cd15650e97b52439e5
parent60a123065966560b7592b14ecdee76bd1593b2fa (diff)
parentd6d42af64ad9c124a065006296573d9be817ff80 (diff)
downloadpython-neutronclient-53e55938d97a4a26be218b709d32a1a251328225.tar.gz
Merge "CLI implementation should raise CommandError"
-rw-r--r--neutronclient/neutron/v2_0/quota.py2
-rw-r--r--neutronclient/tests/unit/test_quota.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/neutronclient/neutron/v2_0/quota.py b/neutronclient/neutron/v2_0/quota.py
index a1144c3..6e7058d 100644
--- a/neutronclient/neutron/v2_0/quota.py
+++ b/neutronclient/neutron/v2_0/quota.py
@@ -207,7 +207,7 @@ class UpdateQuota(neutronV20.NeutronCommand, show.ShowOne):
except Exception:
message = (_('Quota limit for %(name)s must be an integer') %
{'name': name})
- raise exceptions.NeutronClientException(message=message)
+ raise exceptions.CommandError(message=message)
return return_value
def args2body(self, parsed_args):
diff --git a/neutronclient/tests/unit/test_quota.py b/neutronclient/tests/unit/test_quota.py
index 78f4dae..d4bc4aa 100644
--- a/neutronclient/tests/unit/test_quota.py
+++ b/neutronclient/tests/unit/test_quota.py
@@ -37,7 +37,7 @@ class CLITestV20Quota(test_cli20.CLITestV20Base):
test_cli20.MyApp(sys.stdout), None)
args = ['--tenant-id', self.test_id, '--network', 'test']
self.assertRaises(
- exceptions.NeutronClientException, self._test_update_resource,
+ exceptions.CommandError, self._test_update_resource,
resource, cmd, self.test_id, args=args,
extrafields={'network': 'new'})
@@ -58,7 +58,7 @@ class CLITestV20Quota(test_cli20.CLITestV20Base):
test_cli20.MyApp(sys.stdout), None)
args = [self.test_id, '--network', 'test']
self.assertRaises(
- exceptions.NeutronClientException, self._test_update_resource,
+ exceptions.CommandError, self._test_update_resource,
resource, cmd, self.test_id, args=args,
extrafields={'network': 'new'})