source: products/quintagroup.dropdownmenu/trunk/quintagroup/dropdownmenu/Extensions/Install.py @ 3220

Last change on this file since 3220 was 3153, checked in by vmaksymiv, 13 years ago

pyflakes fixes

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