From 3d06315f862150a978ba3c8a7a5a3b1672b6e89d Mon Sep 17 00:00:00 2001 From: Marek Siarkowicz Date: Mon, 15 Jun 2015 14:06:02 +0200 Subject: Proper wrap. --- parrot_zik/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'parrot_zik') diff --git a/parrot_zik/utils.py b/parrot_zik/utils.py index 18b878d..86f52cd 100644 --- a/parrot_zik/utils.py +++ b/parrot_zik/utils.py @@ -1,3 +1,4 @@ +import functools from threading import Lock import gtk @@ -15,10 +16,10 @@ class repeat(object): def start(self, cls, frequency): self.lock.acquire() if not self.id: + @functools.wraps(self.f) def run(): self.f(cls) return True - self.id = gtk.timeout_add(frequency, run) self.lock.release() -- cgit v1.2.1