diff --git a/neutronclient/neutron/v2_0/quota.py b/neutronclient/neutron/v2_0/quota.py index a1144c385..6e7058d8c 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 78f4daefe..d4bc4aac9 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'})