[Zope-CVS] CVS: Packages/Moztop/idesupport/rdf - container.py:1.9

Sidnei da Silva sidnei@x3ng.com.br
Tue, 11 Mar 2003 14:47:50 -0500


Update of /cvs-repository/Packages/Moztop/idesupport/rdf
In directory cvs.zope.org:/tmp/cvs-serv8946

Modified Files:
	container.py 
Log Message:
If the folder was empty, the RDF would be invalid.

=== Packages/Moztop/idesupport/rdf/container.py 1.8 => 1.9 ===
--- Packages/Moztop/idesupport/rdf/container.py:1.8	Mon Mar 10 09:44:55 2003
+++ Packages/Moztop/idesupport/rdf/container.py	Tue Mar 11 14:47:45 2003
@@ -53,11 +53,12 @@
         if fillIn and queryAdapter(base, IRDFContainer):
             _prefix = fillIn['rdf_url'] or ':'
             subs = getAdapter(base, IRDFContainer).getInfo(_prefix)
-            subs_rdf = ''
-            for sub in subs:
-                subs_rdf += _sub_node % ({'realm':realm, 'rdf_url':sub})
-            rdf += _sub_nodes % ({'realm':realm, 'rdf_url':fillIn['rdf_url'],
-                                  'subs_rdf':subs_rdf})
+            if subs:
+                subs_rdf = ''
+                for sub in subs:
+                    subs_rdf += _sub_node % ({'realm':realm, 'rdf_url':sub})
+                    rdf += _sub_nodes % ({'realm':realm, 'rdf_url':fillIn['rdf_url'],
+                                          'subs_rdf':subs_rdf})
 
         if fillIn and IReadContainer.isImplementedBy(base):
             items = base.items()