index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton.feeds@gmail.com> | 2021-09-06 14:40:05 +0000 |
---|---|---|
committer | Anton Hvornum <anton.feeds@gmail.com> | 2021-09-06 14:40:05 +0000 |
commit | 51565314b480e75f00354b73e2420d5cda883fa0 (patch) | |
tree | 5a970f570bc0431605af338298db615661d6b35a /archinstall/lib/packages.py | |
parent | 8a0a9b16e1fa6977e38eacd78eeb26cb54477b20 (diff) | |
parent | 81f3ccad40594fa9e8b4b71d4fae48fe459b6e59 (diff) |
-rw-r--r-- | archinstall/lib/packages.py | 15 |
diff --git a/archinstall/lib/packages.py b/archinstall/lib/packages.py index 0ea195d2..0178d257 100644 --- a/archinstall/lib/packages.py +++ b/archinstall/lib/packages.py @@ -46,10 +46,7 @@ def find_packages(*names): The function itself is rather slow, so consider not sending to many packages to the search query. """ - result = {} - for package in names: - result[package] = find_package(package) - return result + return {package: find_package(package) for package in names} def validate_package_list(packages: list): @@ -57,11 +54,11 @@ def validate_package_list(packages: list): Validates a list of given packages. Raises `RequirementError` if one or more packages are not found. """ - invalid_packages = [] - for package in packages: - if not find_package(package)['results'] and not find_group(package): - invalid_packages.append(package) - + invalid_packages = [ + package + for package in packages + if not find_package(package)['results'] and not find_group(package) + ] if invalid_packages: raise RequirementError(f"Invalid package names: {invalid_packages}") |