File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 88from alws .errors import PlatformNotFoundError , RepositoriesNotFoundError
99from alws .models import Platform , Repository
1010from alws .pulp_models import CoreRepositoryContent , RpmPackage
11+ from alws .utils .pulp_utils import get_uuid_from_pulp_href
1112
1213
1314async def get_package_info (
@@ -40,7 +41,9 @@ async def get_package_info(
4041 msg = f"No repositories found for { platform_name } .{ arch } "
4142 raise RepositoriesNotFoundError (msg )
4243
43- repo_ids = [repo .pulp_href .split ('/' )[- 2 ] for repo in repositories ]
44+ repo_ids = [
45+ get_uuid_from_pulp_href (repo .pulp_href ) for repo in repositories
46+ ]
4447
4548 subq_conditions = [
4649 CoreRepositoryContent .repository_id .in_ (repo_ids ),
@@ -75,8 +78,4 @@ async def get_package_info(
7578 "changelogs" ,
7679 ],
7780 )
78- packages = []
79- for pulp_pkg in pulp_packages :
80- packages .append (PackageTuple (* pulp_pkg )._asdict ())
81-
82- return packages
81+ return [PackageTuple (* pulp_pkg )._asdict () for pulp_pkg in pulp_packages ]
You can’t perform that action at this time.
0 commit comments