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 | |
---|
1 | import logging |
---|
2 | from Products.CMFCore.utils import getToolByName |
---|
3 | from Products.GenericSetup.upgrade import _upgrade_registry |
---|
4 | |
---|
5 | from quintagroup.dropdownmenu import PROJECT_NAME |
---|
6 | |
---|
7 | logger = logging.getLogger('quintagroup.dropdownmenu') |
---|
8 | |
---|
9 | UNINSTALL = "profile-%s:uninstall" % PROJECT_NAME |
---|
10 | |
---|
11 | |
---|
12 | def 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.