diff --git a/github_app_geo_project/module/audit/utils.py b/github_app_geo_project/module/audit/utils.py index 34191b01b59..cb39a1d500a 100644 --- a/github_app_geo_project/module/audit/utils.py +++ b/github_app_geo_project/module/audit/utils.py @@ -401,11 +401,19 @@ def _get_sources( ) for package in _SOURCES[dist].packages: name = f"{dist}/{package.package}" - version = debian_inspector.version.Version.from_string(package.version) - if name not in _PACKAGE_VERSION: - _PACKAGE_VERSION[name] = version - elif version > _PACKAGE_VERSION[name]: - _PACKAGE_VERSION[name] = version + try: + version = debian_inspector.version.Version.from_string(package.version) + if name not in _PACKAGE_VERSION: + _PACKAGE_VERSION[name] = version + elif version > _PACKAGE_VERSION[name]: + _PACKAGE_VERSION[name] = version + except ValueError as exception: + _LOGGER.warning( + "Error while parsing the package %s version of %s: %s", + package.package, + package.version, + exception, + ) return _SOURCES[dist]