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
|
Rev | Line | |
---|
[2876] | 1 | import logging |
---|
| 2 | from Products.CMFCore.utils import getToolByName |
---|
| 3 | |
---|
| 4 | from quintagroup.dropdownmenu import PROJECT_NAME |
---|
| 5 | |
---|
| 6 | logger = logging.getLogger('quintagroup.dropdownmenu') |
---|
| 7 | |
---|
| 8 | UNINSTALL = "profile-%s:uninstall" % PROJECT_NAME |
---|
| 9 | |
---|
[3151] | 10 | |
---|
[2876] | 11 | def uninstall(portal, reinstall=False): |
---|
| 12 | """ Uninstall this product. |
---|
| 13 | |
---|
[3151] | 14 | This external method is need, because portal_quickinstaller doens't |
---|
| 15 | know what GenericProfile profile to apply when uninstalling a product. |
---|
[2876] | 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.