[CMF-checkins] SVN: CMF/branches/1.6/CMFCore/browser/typeinfo.py -
skip non-XML files (e.g. scripts)
Yvo Schubbe
y.2006_ at wcm-solutions.de
Tue Jun 13 15:01:48 EDT 2006
Log message for revision 68616:
- skip non-XML files (e.g. scripts)
Changed:
U CMF/branches/1.6/CMFCore/browser/typeinfo.py
-=-
Modified: CMF/branches/1.6/CMFCore/browser/typeinfo.py
===================================================================
--- CMF/branches/1.6/CMFCore/browser/typeinfo.py 2006-06-13 14:54:25 UTC (rev 68615)
+++ CMF/branches/1.6/CMFCore/browser/typeinfo.py 2006-06-13 19:01:48 UTC (rev 68616)
@@ -17,7 +17,7 @@
from xml.dom.minidom import parseString
-from zope.app import zapi
+from zope.component import queryMultiAdapter
from Products.CMFCore.TypesTool import FactoryTypeInformation
from Products.CMFCore.TypesTool import ScriptableTypeInformation
@@ -44,6 +44,9 @@
context = stool._getImportContext(info['id'])
file_ids = context.listDirectory('types')
for file_id in file_ids or ():
+ if not file_id.endswith('.xml'):
+ continue
+
filename = 'types/%s' % file_id
body = context.readDataFile(filename)
if body is None:
@@ -76,6 +79,9 @@
context = stool._getImportContext(profile_id)
file_ids = context.listDirectory('types')
for file_id in file_ids or ():
+ if not file_id.endswith('.xml'):
+ continue
+
filename = 'types/%s' % file_id
body = context.readDataFile(filename)
if body is None:
@@ -96,7 +102,7 @@
if meta_type != self.klass.meta_type:
continue
- importer = zapi.queryMultiAdapter((obj, context), IBody)
+ importer = queryMultiAdapter((obj, context), IBody)
if importer is None:
continue
More information about the CMF-checkins
mailing list