From 7c790dbbd9c3b11646a17707327ad369f231c2e6 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Wed, 8 Jan 2020 23:52:26 +0100 Subject: [PATCH] Fix issue generic (#1422) * Fix issue on generic * Fix style --- hassio/hassos.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hassio/hassos.py b/hassio/hassos.py index d05a902e0..f2401450e 100644 --- a/hassio/hassos.py +++ b/hassio/hassos.py @@ -112,13 +112,13 @@ class HassOS(CoreSysAttributes): async def load(self) -> None: """Load HassOS data.""" try: - if self.sys_host.info.cpe is None: - raise TypeError() - cpe = CPE(self.sys_host.info.cpe) + if not self.sys_host.info.cpe: + raise NotImplementedError() + cpe = CPE(self.sys_host.info.cpe) if cpe.get_product()[0] != "hassos": - raise TypeError() - except TypeError: + raise NotImplementedError() + except NotImplementedError: _LOGGER.debug("Found no HassOS") return else: