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 <anton.feeds+github@gmail.com>
Co-authored-by: Anton Hvornum <anton@hvornum.se>
This commit is contained in:
Lautron 2023-03-26 16:47:36 -03:00 committed by GitHub
parent 6fdfd93e69
commit 942112f871
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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)})