From 6baa58e059b609e6701b4df5db53b88d0c6e6b82 Mon Sep 17 00:00:00 2001
From: Yusei Tahara <yusei@nexedi.com>
Date: Tue, 29 Jan 2008 17:07:30 +0000
Subject: [PATCH] Fixed previous changes.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18908 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/tests/ERP5TypeTestCase.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/product/ERP5Type/tests/ERP5TypeTestCase.py b/product/ERP5Type/tests/ERP5TypeTestCase.py
index 726c73069c..df6f6e3679 100644
--- a/product/ERP5Type/tests/ERP5TypeTestCase.py
+++ b/product/ERP5Type/tests/ERP5TypeTestCase.py
@@ -502,10 +502,11 @@ class ERP5TypeTestCase(PortalTestCase):
             error_message = ''
             error_log = self.getPortal().error_log._getLog()
             if len(error_log):
+              last_log = error_log[-1]
               error_message = '\nLast error message:\n%s\n%s\n%s\n' % (
-                error_log[0]['type'],
-                error_log[0]['value'],
-                error_log[0]['tb_text'],
+                last_log['type'],
+                last_log['value'],
+                last_log['tb_text'],
                 )
             raise RuntimeError,\
               'tic is looping forever. These messages are pending: %r %s' % (
-- 
2.30.9