projects
/
matthijs
/
projects
/
xerxes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
eb845e4
)
Make log_error actually return a value.
author
Matthijs Kooijman
<matthijs@stdin.nl>
Sun, 1 Feb 2009 17:58:06 +0000
(18:58 +0100)
committer
Matthijs Kooijman
<matthijs@stdin.nl>
Sun, 1 Feb 2009 17:58:06 +0000
(18:58 +0100)
When no error occured, log_error would not pass on the actual value
produced by the decorated function.
tools/misc.py
patch
|
blob
|
history
diff --git
a/tools/misc.py
b/tools/misc.py
index 1259ab7d706284e6abc2164e79d6d90cdbe50143..ba84f05e87141c0be4a9e2efd14bdf1d906dbc1d 100644
(file)
--- 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:
def log_error(func):
def show(*args, **kwargs):
try:
- func(*args, **kwargs)
+
return
func(*args, **kwargs)
except Exception, e:
import traceback
traceback.print_exc()
except Exception, e:
import traceback
traceback.print_exc()