From 5bfb4228f1fff939aa06dfbe446cf17b5ce3ed76 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 11 Feb 2010 21:31:04 -0600 Subject: [PATCH] Making Async and Timeout callable --- src/util/go_utils.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/util/go_utils.py b/src/util/go_utils.py index 8b72dff..47fb16b 100644 --- a/src/util/go_utils.py +++ b/src/util/go_utils.py @@ -74,6 +74,9 @@ class Async(object): gobject.source_remove(self.__idleId) self.__idleId = None + def __call__(self): + return self.start() + @misc.log_exception(_moduleLogger) def _on_once(self): self.cancel() @@ -105,6 +108,9 @@ class Timeout(object): gobject.source_remove(self.__timeoutId) self.__timeoutId = None + def __call__(self, **kwds): + return self.start(**kwds) + @misc.log_exception(_moduleLogger) def _on_once(self): self.cancel() -- 1.7.9.5