Correct reraising of exception
When an exception was caught and rethrown, it should call 'raise' without any arguments because it shows the place where an exception occured initially instead of place where the exception re-raised. Change-Id: If180215bda5592c0cba92cb2c9b3a61c13d62ccf
This commit is contained in:
parent
a1caa55419
commit
85a2fdd70b
|
@ -76,7 +76,7 @@ class Bay(base.APIBase):
|
|||
# Change error code because 404 (NotFound) is inappropriate
|
||||
# response for a POST request to create a Bay
|
||||
e.code = 400 # BadRequest
|
||||
raise e
|
||||
raise
|
||||
elif value == wtypes.Unset:
|
||||
self._baymodel_id = wtypes.Unset
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ class Certificate(base.APIBase):
|
|||
# Change error code because 404 (NotFound) is inappropriate
|
||||
# response for a POST request to create a Bay
|
||||
e.code = 400 # BadRequest
|
||||
raise e
|
||||
raise
|
||||
elif value == wtypes.Unset:
|
||||
self._bay_uuid = wtypes.Unset
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ class K8sAPI(apiv_api.ApivApi):
|
|||
tmp.flush()
|
||||
except Exception as err:
|
||||
LOG.error("Error while creating temp file: %s", err)
|
||||
raise err
|
||||
raise
|
||||
return tmp
|
||||
|
||||
def __init__(self, context, bay):
|
||||
|
|
Loading…
Reference in New Issue