Commit 66bef9c9 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZODB Components: Migration dialog: Module Component: Consider all modules, not only top-level ones.

product/ERP5SyncML/{Transport,Engine}/*.py were not considered.
parent a640eb9b
Pipeline #10181 failed with stage
...@@ -6647,10 +6647,21 @@ Business Template is a set of definitions, such as skins, portal types and categ ...@@ -6647,10 +6647,21 @@ Business Template is a set of definitions, such as skins, portal types and categ
continue continue
seen_module_set = set() seen_module_set = set()
# 'Module Component': Only handle Product top-level modules # Module Components
for submodule_filepath in glob.iglob(product_obj.__path__[0] + '/*.py'): for submodule_filepath in (glob.glob(product_obj.__path__[0] + '/*.py') +
glob.glob(product_obj.__path__[0] + '/*/*.py')):
directory = submodule_filepath.rsplit('/', 2)[-2]
if directory in ('Document', 'Core', 'interfaces', 'mixin', 'Tool',
'tests', 'PropertySheet', 'patches', 'Extensions',
'bin', 'scripts', 'help', 'Accessor', 'Constraint',
'docs', 'dynamic'):
continue
submodule_name = os.path.splitext(os.path.basename(submodule_filepath))[0] submodule_name = os.path.splitext(os.path.basename(submodule_filepath))[0]
source_reference = "%s.%s" % (product_obj.__name__, submodule_name) if directory != product_name:
source_reference = "%s.%s.%s" % (product_obj.__name__, directory, submodule_name)
else:
source_reference = "%s.%s" % (product_obj.__name__, submodule_name)
if (submodule_name not in ('__init__', 'Permissions') and if (submodule_name not in ('__init__', 'Permissions') and
source_reference not in self._migrate_exception_set and source_reference not in self._migrate_exception_set and
source_reference not in seen_module_set): source_reference not in seen_module_set):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment