Last change
on this file since 3258 was
3258,
checked in by vmaksymiv, 13 years ago
|
Fixed import steps registration
|
File size:
653 bytes
|
Line | |
---|
1 | from Products.GenericSetup.registry import _import_step_registry |
---|
2 | |
---|
3 | |
---|
4 | def cleanup_old_importsteps(setuptool): |
---|
5 | """ remove import steps from global registry """ |
---|
6 | |
---|
7 | qgcomments_steps = ['quintagroup.plonecomments.install', |
---|
8 | 'quintagroup.plonecomments.uninstall'] |
---|
9 | registry_tool = setuptool.getImportStepRegistry() |
---|
10 | global_steps = _import_step_registry.listSteps() |
---|
11 | steps = registry_tool.listSteps() |
---|
12 | |
---|
13 | # check and remove steps duplicate |
---|
14 | double_steps = [step for step in steps if step in global_steps] |
---|
15 | for step in qgcomments_steps: |
---|
16 | if step in double_steps: |
---|
17 | del registry_tool._registered[step] |
---|
Note: See
TracBrowser
for help on using the repository browser.