[kupfer] task: Use _finish_callback attribute name (to avoid name clash)
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [kupfer] task: Use _finish_callback attribute name (to avoid name clash)
- Date: Tue, 9 Mar 2010 00:01:57 +0000 (UTC)
commit fca52396b926d32b9a2436e4bd2b7ca2054c08fd
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Tue Mar 9 00:58:29 2010 +0100
task: Use _finish_callback attribute name (to avoid name clash)
kupfer/task.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/kupfer/task.py b/kupfer/task.py
index 246e5ed..58da7ae 100644
--- a/kupfer/task.py
+++ b/kupfer/task.py
@@ -20,7 +20,7 @@ class ThreadTask (Task):
"""Run in a thread"""
def __init__(self, name=None):
Task.__init__(self, name)
- self.finish_callback = None
+ self._finish_callback = None
def thread_do(self):
"""Override this to run what should be done in the thread"""
@@ -40,7 +40,7 @@ class ThreadTask (Task):
try:
self.thread_finally(exc_info)
finally:
- self.finish_callback(self)
+ self._finish_callback(self)
def _run_thread(self):
try:
@@ -55,7 +55,7 @@ class ThreadTask (Task):
gobject.idle_add(self._thread_finally, exc_info)
def start(self, finish_callback):
- self.finish_callback = finish_callback
+ self._finish_callback = finish_callback
thread = threading.Thread(target=self._run_thread)
thread.start()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]