From 08a0bb3fef12d4470e77c9f7c4958f7875f843c8 Mon Sep 17 00:00:00 2001 From: Ian Richardson Date: Fri, 4 Jan 2019 16:05:53 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=EF=B8=8F=20Handle=20possible=20nul?= =?UTF-8?q?l=20air=20dates=20(#12)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- custom_components/sensor/trakt.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3fb3a2d..809ed9b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Version](https://img.shields.io/badge/version-0.0.4-green.svg?style=for-the-badge)](#) [![mantained](https://img.shields.io/maintenance/yes/2018.svg?style=for-the-badge)](#) +[![Version](https://img.shields.io/badge/version-0.0.5-green.svg?style=for-the-badge)](#) [![mantained](https://img.shields.io/maintenance/yes/2018.svg?style=for-the-badge)](#) [![maintainer](https://img.shields.io/badge/maintainer-Ian%20Richardson%20%40iantrich-blue.svg?style=for-the-badge)](#) diff --git a/custom_components/sensor/trakt.py b/custom_components/sensor/trakt.py index a310720..1e36b0a 100644 --- a/custom_components/sensor/trakt.py +++ b/custom_components/sensor/trakt.py @@ -16,7 +16,7 @@ from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.helpers.entity import Entity -__version__ = '0.0.4' +__version__ = '0.0.5' REQUIREMENTS = ['trakt==2.8.2', 'requests_oauthlib==1.0.0'] @@ -155,7 +155,10 @@ def update(self): if not show: continue - show_details = TVShow(show.show) + try: + show_details = TVShow(show.show) + except AttributeError: + _LOGGER.error('Unable to retrieve show details for ' + show.show) if not show_details: continue