From 942112f871ee625f21146f444dd19d08f8640c5e Mon Sep 17 00:00:00 2001 From: Lautron <66799530+Lautron@users.noreply.github.com> Date: Sun, 26 Mar 2023 16:47:36 -0300 Subject: Check if line begins with 'warning' before adding it to package info (#1674) * Check if line begins with 'warning' before adding it to package info, fix #1673 * Implement @Torxed suggestion from #1674 * Replaced 4 spaces with 1 tab --------- Co-authored-by: Anton Hvornum Co-authored-by: Anton Hvornum --- archinstall/lib/packages/packages.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'archinstall') diff --git a/archinstall/lib/packages/packages.py b/archinstall/lib/packages/packages.py index d5834f43..0743e83b 100644 --- a/archinstall/lib/packages/packages.py +++ b/archinstall/lib/packages/packages.py @@ -1,3 +1,4 @@ +import dataclasses import json import ssl from typing import Dict, Any, Tuple, List @@ -112,4 +113,4 @@ def installed_package(package :str) -> LocalPackage: except SysCallError: pass - return LocalPackage(**package_info) + return LocalPackage({field.name: package_info.get(field.name) for field in dataclasses.fields(LocalPackage)}) -- cgit v1.2.3-70-g09d2