Skip to content

Commit

Permalink
🛠️ Handle possible null air dates (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
iantrich authored Jan 4, 2019
1 parent 4033e85 commit 08a0bb3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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)](#)

Expand Down
7 changes: 5 additions & 2 deletions custom_components/sensor/trakt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 08a0bb3

Please sign in to comment.