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

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


Log message for revision 123871:
  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.
  
  This merges r123869 from trunk.
  

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

-=-
Modified: Products.GenericSetup/branches/1.6/Products/GenericSetup/tool.py
===================================================================
--- Products.GenericSetup/branches/1.6/Products/GenericSetup/tool.py	2012-01-02 11:03:50 UTC (rev 123870)
+++ Products.GenericSetup/branches/1.6/Products/GenericSetup/tool.py	2012-01-02 11:08:05 UTC (rev 123871)
@@ -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/branches/1.6/docs/CHANGES.rst
===================================================================
--- Products.GenericSetup/branches/1.6/docs/CHANGES.rst	2012-01-02 11:03:50 UTC (rev 123870)
+++ Products.GenericSetup/branches/1.6/docs/CHANGES.rst	2012-01-02 11:08:05 UTC (rev 123871)
@@ -4,7 +4,11 @@
 1.6.5 (unreleased)
 ------------------
 
-- TBD
+- 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.
 
 
 1.6.4 (2011-10-31)



More information about the checkins mailing list