From 1e69aae79bd1e1c6d14a85ebd798af1c9119baff Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Mon, 22 Dec 2008 17:55:15 +0100 Subject: [PATCH] [IMP] better debug output bzr revid: christophe@cobalt-20081222165515-nk3k1xx04i9u4k0a --- bin/tools/misc.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/tools/misc.py b/bin/tools/misc.py index 9314d8e8055..e69fee24d1f 100644 --- a/bin/tools/misc.py +++ b/bin/tools/misc.py @@ -783,7 +783,10 @@ def debug(what): st = stack()[1] param = re.split("debug *\((.+)\)", st[4][0].strip())[1].strip() while param.count(')') > param.count('('): param = param[:param.rfind(')')] - netsvc.Logger().notifyChannel(st[3], netsvc.LOG_DEBUG, "%s = %s" % (param, pformat(what))) + what = pformat(what) + if param != what: + what = "%s = %s" % (param, what) + netsvc.Logger().notifyChannel(st[3], netsvc.LOG_DEBUG, what) icons = map(lambda x: (x,x), ['STOCK_ABOUT', 'STOCK_ADD', 'STOCK_APPLY', 'STOCK_BOLD',