Author: jmorliaguet
Date: Sat Oct 15 06:22:01 2005
New Revision: 28338

Modified:
   z3lab/cpsskins/branches/jmo-perspectives/browser/rendering/engine.py
Log:

- we assume that renderers output strings



Modified: z3lab/cpsskins/branches/jmo-perspectives/browser/rendering/engine.py
==============================================================================
--- z3lab/cpsskins/branches/jmo-perspectives/browser/rendering/engine.py        
(original)
+++ z3lab/cpsskins/branches/jmo-perspectives/browser/rendering/engine.py        
Sat Oct 15 06:22:01 2005
@@ -199,7 +199,13 @@
         else:
             for node in element.getChildNodes(info=info):
                 renderer = getMultiAdapter((node, request), IRenderer)
-                data.append(renderer(**kw))
+                rendered = renderer(**kw)
+                if isinstance(rendered, (str, unicode)):
+                    data.append(rendered)
+                else:
+                    logger.log(INFO,
+                        "The element '%s' did not render a string." % 
repr(node)
+                        )
             data = ''.join(data)
 
         engine = kw.get('engine', 'default')
@@ -217,7 +223,7 @@
                 )
             return data
 
-        # input data to the filter
+        # store the data that is fed into the filter
         info.input = data
 
         # apply all filters
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to