From a6a2e993cc66836079637f4a31c38590503bcda8 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 6 Apr 2010 15:24:56 +0000 Subject: [PATCH] minor update --- lib/utils/timeout.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/utils/timeout.py b/lib/utils/timeout.py index 804778621..e68eb2c7b 100644 --- a/lib/utils/timeout.py +++ b/lib/utils/timeout.py @@ -2,6 +2,8 @@ import threading +from lib.core.data import logger + def timeout(func, args=(), kwargs={}, duration=1, default=None): class InterruptableThread(threading.Thread): def __init__(self): @@ -12,7 +14,8 @@ def timeout(func, args=(), kwargs={}, duration=1, default=None): def run(self): try: self.result = func(*args, **kwargs) - except: + except Exception, msg: + logger.log(8, msg) self.result = default thread = InterruptableThread()