source: products/quintagroup.gauth/trunk/quintagroup/gauth/Extensions/Install.py @ 2614

Last change on this file since 2614 was 2614, checked in by mylan, 14 years ago

Added uninstallation

  • Property svn:eol-style set to native
File size: 664 bytes
Line 
1import logging
2from Products.CMFCore.utils import getToolByName
3from Products.GenericSetup.upgrade import _upgrade_registry
4
5logger = logging.getLogger('quintagroup.gauth')
6
7def uninstall(portal, reinstall=False):
8    """ Uninstall this product.
9
10        This external method is need, because portal_quickinstaller doens't know
11        what GenericProfile profile to apply when uninstalling a product.
12    """
13    setup_tool = getToolByName(portal, 'portal_setup')
14    if reinstall:
15        return "Ran all reinstall steps."
16    else:
17        setup_tool.runAllImportStepsFromProfile('profile-quintagroup.gauth:uninstall')
18        return "Ran all uninstall steps."
Note: See TracBrowser for help on using the repository browser.