Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/packages.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds@gmail.com>2021-09-06 14:40:05 +0000
committerAnton Hvornum <anton.feeds@gmail.com>2021-09-06 14:40:05 +0000
commit51565314b480e75f00354b73e2420d5cda883fa0 (patch)
tree5a970f570bc0431605af338298db615661d6b35a /archinstall/lib/packages.py
parent8a0a9b16e1fa6977e38eacd78eeb26cb54477b20 (diff)
parent81f3ccad40594fa9e8b4b71d4fae48fe459b6e59 (diff)
Merged in master.
Diffstat (limited to 'archinstall/lib/packages.py')
-rw-r--r--archinstall/lib/packages.py15
1 files changed, 6 insertions, 9 deletions
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}")