From 46aeea673f6de6f86fc7180b5528c68e8d1a4e4d Mon Sep 17 00:00:00 2001 From: Arnaud Fontaine <arnaud.fontaine@nexedi.com> Date: Fri, 5 Aug 2011 10:32:15 +0000 Subject: [PATCH] Catch exceptions raised when instanciating the browser. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@45984 20353a03-c40f-0410-a6d1-a30d3c3de9de --- erp5/util/benchmark/benchmark.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/erp5/util/benchmark/benchmark.py b/erp5/util/benchmark/benchmark.py index 5fc06fc723..5cdf322c6b 100644 --- a/erp5/util/benchmark/benchmark.py +++ b/erp5/util/benchmark/benchmark.py @@ -458,17 +458,12 @@ class BenchmarkProcess(multiprocessing.Process): if self._argument_namespace.repeat != -1: signal.signal(signal.SIGTERM, self.stopGracefully) - try: - self._browser = self.getBrowser(result_instance.log_file) - except: - self._logger.error(traceback.format_exc()) - raise - exit_status = 0 exit_msg = None - # Create the result CSV file try: + self._browser = self.getBrowser(result_instance.log_file) + with result_instance as result: while self._current_repeat != (self._argument_namespace.repeat + 1): self._logger.info("Iteration: %d" % self._current_repeat) -- 2.30.9