Author: jmorliaguet
Date: Sat Jun 24 00:30:54 2006
New Revision: 3504

Modified:
   cpsskins/branches/paris-sprint-2006/setup/io/adapters.py

Log:

- fixed typo

- raise an error if no IO adapter exists for the field



Modified: cpsskins/branches/paris-sprint-2006/setup/io/adapters.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/setup/io/adapters.py    (original)
+++ cpsskins/branches/paris-sprint-2006/setup/io/adapters.py    Sat Jun 24 
00:30:54 2006
@@ -190,7 +190,10 @@
                 field_name = child_el.tagName
                 if field_name in fields:
                     text = child_el.getAttribute(u'value')
-                    field_io = IFieldIO(fields[name], None)
+                    field = fields[field_name]
+                    field_io = IFieldIO(field, None)
+                    if field_io is None:
+                        raise TypeError("No field adapter found for '%s'." % 
field)
                     value = field_io.load(text)
                     if IBinaryFieldIO.providedBy(field_io):
                         filename = value
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to