From 719a6018805c41fac99fa262a40e126cd7f4d8c8 Mon Sep 17 00:00:00 2001 From: chriscla Date: Sun, 15 Sep 2019 22:06:21 -0700 Subject: [PATCH] Use pynzbgetapi exceptions consistently (#26667) --- homeassistant/components/nzbget/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/homeassistant/components/nzbget/__init__.py b/homeassistant/components/nzbget/__init__.py index 563fe2610932..37744dce1803 100644 --- a/homeassistant/components/nzbget/__init__.py +++ b/homeassistant/components/nzbget/__init__.py @@ -3,7 +3,6 @@ from datetime import timedelta import logging import pynzbgetapi -import requests import voluptuous as vol from homeassistant.const import ( @@ -101,6 +100,6 @@ class NZBGetData: self.status = self._api.status() self.available = True dispatcher_send(self.hass, DATA_UPDATED) - except requests.exceptions.ConnectionError: + except pynzbgetapi.NZBGetAPIException: self.available = False _LOGGER.error("Unable to refresh NZBGet data")