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:
parent
6fdfd93e69
commit
942112f871
|
|
@ -1,3 +1,4 @@
|
||||||
|
import dataclasses
|
||||||
import json
|
import json
|
||||||
import ssl
|
import ssl
|
||||||
from typing import Dict, Any, Tuple, List
|
from typing import Dict, Any, Tuple, List
|
||||||
|
|
@ -112,4 +113,4 @@ def installed_package(package :str) -> LocalPackage:
|
||||||
except SysCallError:
|
except SysCallError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
return LocalPackage(**package_info)
|
return LocalPackage({field.name: package_info.get(field.name) for field in dataclasses.fields(LocalPackage)})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue