In r5208, we introduced the concept of unexpected reboots during tests. However in the implementation a finally clause was added right after try/except clauses. which is illegal in py 2.4, the base python version for autotest. Let's fix that.
Signed-off-by: Lucas Meneghel Rodrigues <l...@redhat.com> --- client/bin/job.py | 37 +++++++++++++++++++------------------ 1 files changed, 19 insertions(+), 18 deletions(-) diff --git a/client/bin/job.py b/client/bin/job.py index 3e285c6..6154e8d 100644 --- a/client/bin/job.py +++ b/client/bin/job.py @@ -601,24 +601,25 @@ class base_client_job(base_job.base_job): try: self.record('START', subdir, testname) self._state.set('client', 'unexpected_reboot', (subdir, testname)) - result = function(*args, **dargs) - self.record('END GOOD', subdir, testname) - return result - except error.TestBaseException, e: - self.record('END %s' % e.exit_status, subdir, testname) - raise - except error.JobError, e: - self.record('END ABORT', subdir, testname) - raise - except Exception, e: - # This should only ever happen due to a bug in the given - # function's code. The common case of being called by - # run_test() will never reach this. If a control file called - # run_group() itself, bugs in its function will be caught - # here. - err_msg = str(e) + '\n' + traceback.format_exc() - self.record('END ERROR', subdir, testname, err_msg) - raise + try: + result = function(*args, **dargs) + self.record('END GOOD', subdir, testname) + return result + except error.TestBaseException, e: + self.record('END %s' % e.exit_status, subdir, testname) + raise + except error.JobError, e: + self.record('END ABORT', subdir, testname) + raise + except Exception, e: + # This should only ever happen due to a bug in the given + # function's code. The common case of being called by + # run_test() will never reach this. If a control file called + # run_group() itself, bugs in its function will be caught + # here. + err_msg = str(e) + '\n' + traceback.format_exc() + self.record('END ERROR', subdir, testname, err_msg) + raise finally: self._state.discard('client', 'unexpected_reboot') -- 1.7.4 _______________________________________________ Autotest mailing list Autotest@test.kernel.org http://test.kernel.org/cgi-bin/mailman/listinfo/autotest