From daee9fd489ede6592dc8dc2b62ed4062504a056e Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Mon, 8 Jul 2024 13:46:28 -0700 Subject: [PATCH] Fix parsing missing package_type --- pyproject.toml | 2 +- unhacs/packages.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5115ccc..b40858d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 "] license = "MIT" diff --git a/unhacs/packages.py b/unhacs/packages.py index fab6b24..fe6f89b 100644 --- a/unhacs/packages.py +++ b/unhacs/packages.py @@ -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