[CMF-checkins] SVN: CMF/trunk/CMFCore/browser/typeinfo.py - fixed
BBB for CMF 1.5 profiles
Yvo Schubbe
y.2005- at wcm-solutions.de
Fri Dec 16 13:19:12 EST 2005
Log message for revision 40817:
- fixed BBB for CMF 1.5 profiles
Changed:
U CMF/trunk/CMFCore/browser/typeinfo.py
-=-
Modified: CMF/trunk/CMFCore/browser/typeinfo.py
===================================================================
--- CMF/trunk/CMFCore/browser/typeinfo.py 2005-12-16 17:35:57 UTC (rev 40816)
+++ CMF/trunk/CMFCore/browser/typeinfo.py 2005-12-16 18:19:12 UTC (rev 40817)
@@ -49,10 +49,15 @@
if body is None:
continue
root = parseString(body).documentElement
- obj_id = root.getAttribute('name')
+ obj_id = str(root.getAttribute('name'))
if not obj_id:
- obj_id = root.getAttribute('id')
- if root.getAttribute('meta_type') != self.klass.meta_type:
+ # BBB: for CMF 1.5 profiles
+ obj_id = str(root.getAttribute('id'))
+ # BBB: for CMF 1.5 profiles
+ meta_type = str(root.getAttribute('kind'))
+ if not meta_type:
+ meta_type = str(root.getAttribute('meta_type'))
+ if meta_type != self.klass.meta_type:
continue
obj_ids.append(obj_id)
if not obj_ids:
@@ -77,13 +82,18 @@
continue
root = parseString(body).documentElement
- new_id = root.getAttribute('name')
+ new_id = str(root.getAttribute('name'))
if not new_id:
- new_id = root.getAttribute('id')
+ # BBB: for CMF 1.5 profiles
+ new_id = str(root.getAttribute('id'))
if new_id != obj_path[0]:
continue
- if root.getAttribute('meta_type') != self.klass.meta_type:
+ # BBB: for CMF 1.5 profiles
+ meta_type = str(root.getAttribute('kind'))
+ if not meta_type:
+ meta_type = str(root.getAttribute('meta_type'))
+ if meta_type != self.klass.meta_type:
continue
importer = zapi.queryMultiAdapter((obj, context), IBody)
More information about the CMF-checkins
mailing list