[Checkins] SVN: Products.GenericSetup/trunk/ While importing toolset.xml, only warn about missing required tools.

Maurits van Rees m.van.rees at zestsoftware.nl
Mon Jan 2 11:03:51 UTC 2012


Log message for revision 123870:
  While importing toolset.xml, only warn about missing required tools.
  
  We print a warning when the class of a required tool is not found and
  continue with the next tool.  The previous behaviour could break the
  install or uninstall of any add-on, as the missing class may easily be
  from a different unrelated add-on that is no longer available in the
  zope instance.
  

Changed:
  U   Products.GenericSetup/trunk/Products/GenericSetup/tool.py
  U   Products.GenericSetup/trunk/docs/CHANGES.rst

-=-
Modified: Products.GenericSetup/trunk/Products/GenericSetup/tool.py
===================================================================
--- Products.GenericSetup/trunk/Products/GenericSetup/tool.py	2011-12-29 18:42:28 UTC (rev 123869)
+++ Products.GenericSetup/trunk/Products/GenericSetup/tool.py	2012-01-02 11:03:50 UTC (rev 123870)
@@ -112,7 +112,9 @@
         tool_id = str(info['id'])
         tool_class = _resolveDottedName(info['class'])
         if tool_class is None:
-            logger.info('Class %(class)s not found for tool %(id)s' % info)
+            logger.warning("Not creating required tool %(id)s, because "
+                           "class %(class)s is not found." % info)
+            continue
 
         existing = getattr(aq_base(site), tool_id, None)
         # Don't even initialize the tool again, if it already exists.

Modified: Products.GenericSetup/trunk/docs/CHANGES.rst
===================================================================
--- Products.GenericSetup/trunk/docs/CHANGES.rst	2011-12-29 18:42:28 UTC (rev 123869)
+++ Products.GenericSetup/trunk/docs/CHANGES.rst	2012-01-02 11:03:50 UTC (rev 123870)
@@ -4,6 +4,12 @@
 1.7.0 (unreleased)
 ------------------
 
+- While importing toolset.xml, print a warning when the class of a
+  required tool is not found and continue with the next tool.  The
+  previous behaviour could break the install or uninstall of any
+  add-on, as the missing class may easily be from a different
+  unrelated add-on that is no longer available in the zope instance.
+
 - Exporters now explicitly only understand strings. The provided
   registry handlers encode and decode data automatically to and from
   utf-8. Their default encoding changed from None to utf-8.



More information about the checkins mailing list