[SCM] morituri/master: * morituri/common/task.py: Move methods around.
js at users.alioth.debian.org
js at users.alioth.debian.org
Sun Oct 19 20:08:44 UTC 2014
The following commit has been merged in the master branch:
commit 6234b08a2fd5db692bcc345cbb972e4c20b090af
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date: Sat Apr 11 16:38:41 2009 +0000
* morituri/common/task.py:
Move methods around.
diff --git a/ChangeLog b/ChangeLog
index 9811285..330bc0e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2009-04-11 Thomas Vander Stichele <thomas at apestaart dot org>
+ * morituri/common/task.py:
+ Move methods around.
+
+2009-04-11 Thomas Vander Stichele <thomas at apestaart dot org>
+
* examples/ARcue.py:
* examples/gtkcrc.py:
* morituri/common/crc.py:
diff --git a/morituri/common/task.py b/morituri/common/task.py
index f0a1127..ff16967 100644
--- a/morituri/common/task.py
+++ b/morituri/common/task.py
@@ -39,20 +39,30 @@ class Task(object):
_listeners = None
- def debug(self, *args, **kwargs):
- return
- print args, kwargs
- sys.stdout.flush()
+ ### subclass methods
def start(self):
+ """
+ Subclasses should chain up to me at the beginning.
+ """
+ self.progress = 0.0
self.running = True
self._notifyListeners('started')
def stop(self):
+ """
+ Subclasses should chain up to me at the end.
+ """
self.debug('stopping')
self.running = False
self._notifyListeners('stopped')
+ ### base class methods
+ def debug(self, *args, **kwargs):
+ return
+ print self, args, kwargs
+ sys.stdout.flush()
+
def setProgress(self, value):
if value - self.progress > self.increment or value >= 1.0:
self.progress = value
--
morituri packaging
More information about the pkg-multimedia-commits
mailing list