mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Also catch HTTPException in API.check_companion_enabled
This commit is contained in:
parent
704c8829f0
commit
1899ecb999
1 changed files with 5 additions and 0 deletions
|
@ -6,6 +6,7 @@ import json
|
||||||
import requests
|
import requests
|
||||||
from six import ensure_str
|
from six import ensure_str
|
||||||
|
|
||||||
|
from ..helper.exceptions import HTTPException
|
||||||
from ..helper.utils import settings
|
from ..helper.utils import settings
|
||||||
from ..helper import LazyLogger
|
from ..helper import LazyLogger
|
||||||
|
|
||||||
|
@ -268,6 +269,10 @@ class API(object):
|
||||||
LOG.warning("Error checking companion installed state: %s", e)
|
LOG.warning("Error checking companion installed state: %s", e)
|
||||||
if e.response.status_code == 404:
|
if e.response.status_code == 404:
|
||||||
return False
|
return False
|
||||||
|
except HTTPException as e:
|
||||||
|
LOG.warning("Error checking companion installed state: %s", e)
|
||||||
|
if e.status == 404:
|
||||||
|
return False
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue