zaheer - in flumotion/trunk: . flumotion/common

flumotion-commit at lists.fluendo.com flumotion-commit at lists.fluendo.com
Wed May 9 11:23:48 CEST 2007


Author: zaheer
Date: Wed May  9 11:23:45 2007
New Revision: 4897

Modified:
   flumotion/trunk/ChangeLog
   flumotion/trunk/TODO
   flumotion/trunk/flumotion/common/config.py
Log:
	* TODO:
	* flumotion/common/config.py (FlumotionConfigXML._parseEaters):
	Thanks Andy, using the helper method parseAttributes.



Modified: flumotion/trunk/ChangeLog
==============================================================================
--- flumotion/trunk/ChangeLog	(original)
+++ flumotion/trunk/ChangeLog	Wed May  9 11:23:45 2007
@@ -1,3 +1,9 @@
+2007-05-09  Zaheer Abbas Merali  <<zaheerabbas at merali dot org>>
+
+	* TODO:
+	* flumotion/common/config.py (FlumotionConfigXML._parseEaters):
+	Thanks Andy, using the helper method parseAttributes.
+
 2007-05-08  Zaheer Abbas Merali  <<zaheerabbas at merali dot org>>
 
 	* flumotion/test/test.xml:

Modified: flumotion/trunk/TODO
==============================================================================
--- flumotion/trunk/TODO	(original)
+++ flumotion/trunk/TODO	Wed May  9 11:23:45 2007
@@ -12,7 +12,7 @@
 * MEDIUM	add api for admins to "subscribe" to admin methods in the
 		manager, so only relevant commands get sent
 
-* EASY		deprecate <source> tag and require base= attribute to <comp>
+* EASY		require base= attribute to <comp>
 
 * EASY		remove all old deprecated bundling code everywhere
 

Modified: flumotion/trunk/flumotion/common/config.py
==============================================================================
--- flumotion/trunk/flumotion/common/config.py	(original)
+++ flumotion/trunk/flumotion/common/config.py	Wed May  9 11:23:45 2007
@@ -653,20 +653,16 @@
         hasSourceNodes = False
         for subnode in node.childNodes:
             if subnode.nodeName == 'eater':
-                if subnode.hasAttribute('name'):
-                    name = subnode.getAttribute('name')
-                    if nodes.has_key(name):
-                        raise ConfigError("Component %s should not have "
-                            "multiple eater nodes configured with same name:"
-                            " %s" % (node.nodeName, name))
-                    feedNodes = []
-                    for eaterSubnode in subnode.childNodes:
-                        if eaterSubnode.nodeName == 'feed':
-                            feedNodes.append(eaterSubnode)
-                    nodes[name] = self.get_string_values(feedNodes)
-                else:
-                    raise ConfigError("Component %s has eaters specified with "
-                        "no name property." % (node.nodeName))
+                name, = self.parseAttributes(subnode, ('name',))
+                if nodes.has_key(name):
+                    raise ConfigError("Component %s should not have "
+                        "multiple eater nodes configured with same name:"
+                        " %s" % (node.nodeName, name))
+                feedNodes = []
+                for eaterSubnode in subnode.childNodes:
+                    if eaterSubnode.nodeName == 'feed':
+                        feedNodes.append(eaterSubnode)
+                nodes[name] = self.get_string_values(feedNodes)
             if subnode.nodeName == 'source':
                 hasSourceNodes = True
 


More information about the flumotion-commit mailing list