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

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

pep8 fixes

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