[REF] simplify code
This commit is contained in:
parent
3b3d652756
commit
68bfe19acd
|
|
@ -118,18 +118,13 @@ class Analysis(object):
|
|||
for odoo_module in self.modules:
|
||||
for module_version in odoo_module.module_versions.values():
|
||||
module_result = module_version.get_requirements(ctx)
|
||||
python_result = result[module_result["version"]]["python"]
|
||||
module_name = module_result["module_name"]
|
||||
for python_lib in module_result["python"]:
|
||||
if (
|
||||
python_lib
|
||||
not in result[module_result["version"]]["python"]
|
||||
):
|
||||
result[module_result["version"]]["python"][
|
||||
python_lib
|
||||
] = [module_result["module_name"]]
|
||||
if python_lib not in python_result:
|
||||
python_result[python_lib] = [module_name]
|
||||
else:
|
||||
result[module_result["version"]]["python"][
|
||||
python_lib
|
||||
].append(module_result["module_name"])
|
||||
python_result[python_lib].append(module_name)
|
||||
return result
|
||||
|
||||
def _generate_module_version_first_version(self, ctx, module_list):
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user