Remove shadow BaseException class

The BaseException class defined in exceptions.py is shadowing the
built-in BaseException class of the Python exception hierarchy, which
could potentially cause confusion.

This removes the BaseException definition and replaces it with the
existing WatcherException object.  Instantiations of the
IllegalArgumentException are also changed to use the message kwarg.

Change-Id: I20abf135805c7a354924de8a5194b59fc040460a
Closes-Bug: #1535504
This commit is contained in:
Taylor Peoples
2016-01-19 04:55:14 +01:00
parent 7fcb683404
commit a7455a8bf7
3 changed files with 9 additions and 44 deletions

View File

@@ -63,7 +63,7 @@ class ChangeNovaServiceState(base.BasePrimitive):
def nova_manage_service(self, state):
if state is None:
raise exception.IllegalArgumentException(
_("The target state is not defined"))
message=_("The target state is not defined"))
keystone = kclient.KeystoneClient()
wrapper = nclient.NovaClient(keystone.get_credentials(),