From df93906a9e8f2a951f64d2b97583f7bd09534052 Mon Sep 17 00:00:00 2001 From: ced <> Date: Tue, 17 Jul 2007 08:28:25 +0000 Subject: [PATCH] kernel: remove print and use logger bzr revid: ced-14412798a4e99f6e4ac267a7f5b85b62ec740562 --- bin/netsvc.py | 1 - bin/report/report_sxw.py | 4 +++- bin/tools/convert.py | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/netsvc.py b/bin/netsvc.py index 77e14caa362..48c789fe014 100644 --- a/bin/netsvc.py +++ b/bin/netsvc.py @@ -32,7 +32,6 @@ class ServiceEndPoint(object): def __init__(self, name, id): self._id = id self._meth={} - print _service s=_service[name] for m in s._method: self._meth[m]=s._method[m] diff --git a/bin/report/report_sxw.py b/bin/report/report_sxw.py index dff725a80f5..1e9742536c2 100644 --- a/bin/report/report_sxw.py +++ b/bin/report/report_sxw.py @@ -154,7 +154,9 @@ 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))) + import traceback, sys + tb_s = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback)) + netsvc.Logger().notifyChannel('report', netsvc.LOG_ERROR, 'report %s: %s\n%s' % (self.name, tb_s, str(e))) res = 'Error' return res diff --git a/bin/tools/convert.py b/bin/tools/convert.py index 53560e7c598..2963ca86b70 100644 --- a/bin/tools/convert.py +++ b/bin/tools/convert.py @@ -330,7 +330,6 @@ class xml_import(object): class d(dict): def __getitem__(self2, key): return getattr(model.browse(cr, self.uid, id), key) - print "RESULT", eval(f_expr, d()) def _tag_record(self, cr, rec, data_node=None): rec_model = rec.getAttribute("model").encode('ascii')