index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton@hvornum.se> | 2021-09-06 15:54:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-06 15:54:52 +0200 |
commit | 1030bd19c58d6587c8c49eb015c78e488a49425e (patch) | |
tree | 9c6915a162048a52a66fa661b2d9d4a44c6db323 /archinstall/lib/packages.py | |
parent | a5a56728f155f689bed5826bbd30532a56450cf3 (diff) | |
parent | 40cd8011847e21f5116c49aaff0336a89988eb92 (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}") |