def delay(self, timeout, func):
def func_wrapper():
try:
func()
except Exception:
self.exception()
t = threading.Timer(timeout, func_wrapper, ())
t.start()
return t