[CMF-checkins] SVN: CMF/branches/1.6/CMFCore/exportimport/ *
merging Tres's changes from CMF trunk to work w/ new
GenericSetup logging
Rob Miller
ra at burningman.com
Sat Nov 19 15:11:37 EST 2005
Log message for revision 40255:
* merging Tres's changes from CMF trunk to work w/ new GenericSetup logging
strategy
* adding _isTypeInformation attribute to dummy type info
Changed:
U CMF/branches/1.6/CMFCore/exportimport/content.py
U CMF/branches/1.6/CMFCore/exportimport/tests/test_content.py
-=-
Modified: CMF/branches/1.6/CMFCore/exportimport/content.py
===================================================================
--- CMF/branches/1.6/CMFCore/exportimport/content.py 2005-11-19 20:09:26 UTC (rev 40254)
+++ CMF/branches/1.6/CMFCore/exportimport/content.py 2005-11-19 20:11:37 UTC (rev 40255)
@@ -145,9 +145,9 @@
object = self._makeInstance(object_id, portal_type,
subdir, import_context)
if object is None:
- message = "Couldn't make instance: %s/%s" % (subdir,
- object_id)
- import_context.note('SFWA', message)
+ logger = import_context.getLogger('SFWA')
+ logger.warning("Couldn't make instance: %s/%s" %
+ (subdir, object_id))
continue
wrapped = context._getOb(object_id)
Modified: CMF/branches/1.6/CMFCore/exportimport/tests/test_content.py
===================================================================
--- CMF/branches/1.6/CMFCore/exportimport/tests/test_content.py 2005-11-19 20:09:26 UTC (rev 40254)
+++ CMF/branches/1.6/CMFCore/exportimport/tests/test_content.py 2005-11-19 20:11:37 UTC (rev 40255)
@@ -429,7 +429,7 @@
after = site.objectIds()
self.assertEqual(len(after), 0)
self.assertEqual(len(context._notes), len(ITEM_IDS))
- for component, message in context._notes:
+ for level, component, message in context._notes:
self.assertEqual(component, 'SFWA')
self.failUnless(message.startswith("Couldn't make"))
@@ -826,6 +826,7 @@
from Products.CMFCore.tests.base.dummy import DummyType
class _TypeInfo(DummyType):
+ _isTypeInformation = 1
def _getId(self):
return self._id
def constructInstance(self, container, id, *args, **kw):
More information about the CMF-checkins
mailing list