[SCM] morituri/master: * morituri/common/task.py: Make task subclass log.Log

js at users.alioth.debian.org js at users.alioth.debian.org
Sun Oct 19 20:08:50 UTC 2014


The following commit has been merged in the master branch:
commit 4367038f6c2f15f43fb20009595aa79b0d50e65b
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date:   Fri May 1 08:13:51 2009 +0000

    	* morituri/common/task.py:
    	  Make task subclass log.Log

diff --git a/ChangeLog b/ChangeLog
index d55d9d7..d56067a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2009-05-01  Thomas Vander Stichele  <thomas at apestaart dot org>
 
+	* morituri/common/task.py:
+	  Make task subclass log.Log
+
+2009-05-01  Thomas Vander Stichele  <thomas at apestaart dot org>
+
 	* morituri/common/log.py:
 	  Add external log module and use it.
 
diff --git a/morituri/common/task.py b/morituri/common/task.py
index 0eb25ef..2219827 100644
--- a/morituri/common/task.py
+++ b/morituri/common/task.py
@@ -25,7 +25,9 @@ import sys
 import gobject
 import gtk
 
-class Task(object):
+from morituri.common import log
+
+class Task(object, log.Loggable):
     """
     I wrap a task in an asynchronous interface.
     I can be listened to for starting, stopping, and progress updates.
@@ -66,11 +68,6 @@ class Task(object):
         self._notifyListeners('stopped')
 
     ### base class methods
-    def debug(self, *args, **kwargs):
-        return
-        print self, args, kwargs
-        sys.stdout.flush()
-
     def setProgress(self, value):
         """
         Notify about progress changes bigger than the increment.
@@ -79,7 +76,7 @@ class Task(object):
         if value - self.progress > self.increment or value >= 1.0 or value == 0.0:
             self.progress = value
             self._notifyListeners('progressed', value)
-            self.debug('notifying progress', value)
+            self.debug('notifying progress: %r', value)
         
     def setDescription(self, description):
         if description != self.description:

-- 
morituri packaging



More information about the pkg-multimedia-commits mailing list