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

Sidnei da Silva sidnei@x3ng.com.br
Tue, 11 Mar 2003 15:33:29 -0500


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

Modified Files:
	container.py 
Log Message:
Humm.. an empty folder is == False. Thats why we werent getting Configurations for an empty site.

=== Packages/Moztop/idesupport/rdf/container.py 1.9 => 1.10 ===
--- Packages/Moztop/idesupport/rdf/container.py:1.9	Tue Mar 11 14:47:45 2003
+++ Packages/Moztop/idesupport/rdf/container.py	Tue Mar 11 15:33:27 2003
@@ -43,16 +43,17 @@
         realm = self.realm
         fillIn = {}
 
-        if queryAdapter(base, IRDFNode):
-            node = getAdapter(base, IRDFNode)
-            fillIn = node.getInfo(id, self.request, prefix)
+        rdf_node = queryAdapter(base, IRDFNode)
+        if rdf_node is not None:
+            fillIn = rdf_node.getInfo(id, self.request, prefix)
             fillIn = removeAllProxies(fillIn)
             fillIn.update({'realm':realm})
             rdf += _node % fillIn
 
-        if fillIn and queryAdapter(base, IRDFContainer):
+        rdf_container = queryAdapter(base, IRDFContainer)
+        if fillIn and rdf_container is not None:
             _prefix = fillIn['rdf_url'] or ':'
-            subs = getAdapter(base, IRDFContainer).getInfo(_prefix)
+            subs = rdf_container.getInfo(_prefix)
             if subs:
                 subs_rdf = ''
                 for sub in subs:
@@ -78,8 +79,8 @@
         self.realm = view.getRealm()
         rdf  = _rdf_start
         rdf +=  self._makeSubtree('', self.context, prefix='content')
-        if queryAdapter(self.context, IServiceManagerContainer):
-            smc = getAdapter(self.context, IServiceManagerContainer)
+        smc = queryAdapter(self.context, IServiceManagerContainer)
+        if smc is not None:
             sm = smc.queryServiceManager(None)
             if sm is not None:
                 sm = ContextWrapper(sm, self.context, name='++etc++Services')