From b663a52c3f78bd6cedd4317e7a65be87325b109d Mon Sep 17 00:00:00 2001 From: ced <> Date: Tue, 17 Jul 2007 08:27:58 +0000 Subject: [PATCH] kernel: add logger on report eval bzr revid: ced-93ec04a30f4e564cc1f24ce3e133f6b76386c7ef --- bin/report/report_sxw.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/report/report_sxw.py b/bin/report/report_sxw.py index 88f7c68c789..dff725a80f5 100644 --- a/bin/report/report_sxw.py +++ b/bin/report/report_sxw.py @@ -34,6 +34,8 @@ from interface import report_rml import re import tools import pooler +import netsvc +import warnings import copy @@ -61,7 +63,7 @@ class browse_record_list(list): return "browse_record_list("+str(len(self))+")" def repeatIn(self, name): - print 'Decrecated ! Use repeatIn(object_list, \'variable\')' + warnings.warn('Use repeatIn(object_list, \'variable\')', DeprecationWarning) node = self.context['_node'] node.data = '' while True: @@ -152,6 +154,7 @@ class rml_parse(object): if res is False or res is None: res = '' except Exception,e: + netsvc.Logger().notifyChannel('report', netsvc.LOG_ERROR, 'report %s: %s' % (self.name, str(e))) res = 'Error' return res