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: I4c0dd68a00be1cc8b33f0e886678fdc14d13dc21
This commit is contained in:
gecong1973 2016-08-02 15:57:52 +08:00
parent 5c04f106a1
commit e750d49cdd

View File

@ -132,7 +132,7 @@ def execute_job(job_id, data):
LOG.error(_LE("Can't run job execution. "
"(Reasons: {reason})").format(reason=e))
conductor.job_execution_destroy(context.ctx(), job_execution)
raise e
raise
api.OPS.run_edp_job(job_execution.id)