#19 — Install.applyGenericSetupProfile should not swallow exceptions

State Resolved
Version: 1.0
Area Process
Issue type Bug
Severity Medium
Submitted by Sig
Submitted on Feb 17, 2009
Responsible Maurits van Rees
Target release: 1.0
In some cases (see steps to reproduce), installing feedfeeder on Plone 3.x raises a KeyError exception with the traceback below. This exception hides the real exception behind it because Install.applyGenericSetupProfile swallows some exceptions (try: ... except: ...).

The traceback :

2009-02-17 01:05:10 ERROR Zope.SiteErrorLog http://localhost:6080/[…]/prefs_reinstallProducts
Traceback (innermost last):
  Module ZPublisher.Publish, line 119, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module Products.CMFCore.FSPythonScript, line 140, in __call__
  Module Shared.DC.Scripts.Bindings, line 313, in __call__
  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  Module Products.CMFCore.FSPythonScript, line 196, in _exec
  Module None, line 11, in prefs_reinstallProducts
   - <FSPythonScript at /demo/plone00/prefs_reinstallProducts used for /demo/plone00/portal_quickinstaller>
   - Line 11
  Module <string>, line 6, in _facade
  Module AccessControl.requestmethod, line 64, in _curried
  Module Products.CMFQuickInstallerTool.QuickInstallerTool, line 643, in reinstallProducts
  Module Products.CMFQuickInstallerTool.QuickInstallerTool, line 584, in installProducts
  Module Products.CMFQuickInstallerTool.QuickInstallerTool, line 507, in installProduct
   - __traceback_info__: ('wecena.policy',)
  Module Products.ExternalMethod.ExternalMethod, line 231, in __call__
   - __traceback_info__: ((<QuickInstallerTool at /demo/plone00/portal_quickinstaller>,), {'reinstall': True}, (False,))
  Module /some_buildout/src/some_product/Extensions/Install.py, line 41, in install
  Module <string>, line 6, in _facade
  Module AccessControl.requestmethod, line 64, in _curried
  Module Products.CMFQuickInstallerTool.QuickInstallerTool, line 643, in reinstallProducts
  Module Products.CMFQuickInstallerTool.QuickInstallerTool, line 584, in installProducts
  Module Products.CMFQuickInstallerTool.QuickInstallerTool, line 509, in installProduct
   - __traceback_info__: ('feedfeeder',)
  Module Products.ExternalMethod.ExternalMethod, line 231, in __call__
   - __traceback_info__: ((<QuickInstallerTool at /demo/plone00/portal_quickinstaller>,), {}, None)
  Module /some_path/eggs/Products.feedfeeder-1.0rc3-py2.4.egg/Products/feedfeeder/Extensions/install.py, line 7, in install
  Module /some_path/eggs/Products.feedfeeder-1.0rc3-py2.4.egg/Products/feedfeeder/Extensions/install.py, line 23, in applyGenericSetupProfile
  Module Products.GenericSetup.tool, line 224, in setImportContext
  Module Products.GenericSetup.registry, line 669, in getProfileInfo
KeyError: 'CMFPlone:plone'
Steps to reproduce:
1/ have Plone 3.x plus a Product with an import step that raises an exception
2/ try to install feedfeeder
Added by Maurits van Rees on Feb 17, 2009 10:31 PM
Issue state: UnconfirmedResolved
Responsible manager: (UNASSIGNED)maurits
Target release: None1.0
Right, a bare except like we have there is almost never a good idea. And I can see that in this case it would send you on a wild goose chase after an error that is not the real error as the real error is hidden.

I changed it into 'except AttributeError' in r80996.

No responses can be added.