Fix parsing missing package_type
This commit is contained in:
parent
260eacf78f
commit
daee9fd489
@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
|
|||||||
|
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "unhacs"
|
name = "unhacs"
|
||||||
version = "0.5.0"
|
version = "0.5.1"
|
||||||
description = "Command line interface to install Home Assistant Community Store packages"
|
description = "Command line interface to install Home Assistant Community Store packages"
|
||||||
authors = ["Ian Fijolek <ian@iamthefij.com>"]
|
authors = ["Ian Fijolek <ian@iamthefij.com>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
@ -75,7 +75,7 @@ class Package:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def from_yaml(yaml: dict) -> "Package":
|
def from_yaml(yaml: dict) -> "Package":
|
||||||
# Convert package_type to enum
|
# Convert package_type to enum
|
||||||
package_type = yaml.pop("package_type")
|
package_type = yaml.pop("package_type", None)
|
||||||
if package_type and isinstance(package_type, str):
|
if package_type and isinstance(package_type, str):
|
||||||
package_type = PackageType(package_type)
|
package_type = PackageType(package_type)
|
||||||
yaml["package_type"] = package_type
|
yaml["package_type"] = package_type
|
||||||
|
Loading…
Reference in New Issue
Block a user