Fix parsing missing package_type
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
IamTheFij 2024-07-08 13:46:28 -07:00
parent 260eacf78f
commit daee9fd489
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "unhacs"
version = "0.5.0"
version = "0.5.1"
description = "Command line interface to install Home Assistant Community Store packages"
authors = ["Ian Fijolek <ian@iamthefij.com>"]
license = "MIT"

View File

@ -75,7 +75,7 @@ class Package:
@staticmethod
def from_yaml(yaml: dict) -> "Package":
# 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):
package_type = PackageType(package_type)
yaml["package_type"] = package_type