From 4bd2ee34c818b499888d3f0bb52ffbf1eb58580b Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Sun, 1 Feb 2009 18:58:06 +0100 Subject: [PATCH] Make log_error actually return a value. When no error occured, log_error would not pass on the actual value produced by the decorated function. --- tools/misc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/misc.py b/tools/misc.py index 1259ab7..ba84f05 100644 --- a/tools/misc.py +++ b/tools/misc.py @@ -22,7 +22,7 @@ prints it to stdout and raises it again. def log_error(func): def show(*args, **kwargs): try: - func(*args, **kwargs) + return func(*args, **kwargs) except Exception, e: import traceback traceback.print_exc() -- 2.30.2