msmith - in flumotion/trunk: . flumotion/admin

flumotion-commit at lists.fluendo.com flumotion-commit at lists.fluendo.com
Tue Mar 27 13:06:16 CEST 2007


Author: msmith
Date: Tue Mar 27 13:06:13 2007
New Revision: 4686

Modified:
   flumotion/trunk/ChangeLog
   flumotion/trunk/flumotion/admin/admin.py
Log:
        * flumotion/admin/admin.py:
          Apply patch to getEntry to not use deferred generator, which was
          mysteriously breaking things.
          Fixes #596.



Modified: flumotion/trunk/ChangeLog
==============================================================================
--- flumotion/trunk/ChangeLog	(original)
+++ flumotion/trunk/ChangeLog	Tue Mar 27 13:06:13 2007
@@ -1,3 +1,10 @@
+2007-03-27  Michael Smith  <msmith at fluendo.com>
+
+	* flumotion/admin/admin.py:
+	  Apply patch to getEntry to not use deferred generator, which was
+	  mysteriously breaking things.
+	  Fixes #596.
+
 2007-03-26  Thomas Vander Stichele  <thomas at apestaart dot org>
 
 	* flumotion/service/service.py (Servicer._parseManagersWorkers,

Modified: flumotion/trunk/flumotion/admin/admin.py
==============================================================================
--- flumotion/trunk/flumotion/admin/admin.py	(original)
+++ flumotion/trunk/flumotion/admin/admin.py	Tue Mar 27 13:06:13 2007
@@ -599,19 +599,21 @@
                  fileName:  the relative location of the bundled file
                 methodName: the method to instantiate with
         """
-        d = self.callRemote('getEntryByType', componentState, type)
-        yield d
+        def gotBundle(res, fileName, methodName):
+            name, bundlePath = res[-1]
+            return (bundlePath, fileName, methodName)
 
-        fileName, methodName = d.value()
+        def gotEntry(res):
+            fileName, methodName = res
             
-        self.debug("entry for %r of type %s is in file %s and method %s" % (
-            componentState, type, fileName, methodName))
-        d = self.bundleLoader.getBundles(fileName=fileName)
-        yield d
-
-        name, bundlePath = d.value()[-1]
-        yield (bundlePath, fileName, methodName)
-    getEntry = defer_generator_method(getEntry)
+            self.debug("entry for %r of type %s is in file %s and method %s" % (
+                componentState, type, fileName, methodName))
+            d = self.bundleLoader.getBundles(fileName=fileName)
+            d.addCallback(gotBundle, fileName,  methodName)
+            return d
+        d = self.callRemote('getEntryByType', componentState, type)
+        d.addCallback(gotEntry)
+        return d
 
     ## worker remote methods
     def checkElements(self, workerName, elements):


More information about the flumotion-commit mailing list