Skip to content

Commit

Permalink
feat: specific log message if package has not found
Browse files Browse the repository at this point in the history
  • Loading branch information
Romazes committed Aug 14, 2024
1 parent 93c8fda commit c50f92b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lean/components/cloud/module_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,16 @@ def install_module(self, product_id: int, organization_id: str, module_version:
if package.name not in packages_to_download or package.version > packages_to_download[package.name].version:
packages_to_download[package.name] = package
if module_version and package.version.split('.')[-1] <= module_version:
self._logger.debug(f'module_manager.install_module:'
f'Found requested version {module_version} for module {product_id}.')
packages_to_download_specific_version[package.name] = package

# Replace version packages based on module_version if available
for package_name, package_specific_version in packages_to_download_specific_version.items():
packages_to_download[package_name] = package_specific_version

for package in packages_to_download.values():
if module_version and package.version.split('.')[-1] != module_version:
self._logger.debug(f'Package "{package.name}" does not have the specified version {module_version}. '
f'Using available version {package.version} instead.')
self._download_file(product_id, organization_id, package)

self._installed_product_ids.add(product_id)
Expand Down

0 comments on commit c50f92b

Please sign in to comment.