Skip to content

Commit

Permalink
Also catch HTTPException in API.check_companion_enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
oddstr13 committed May 17, 2024
1 parent 704c882 commit 1899ecb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions jellyfin_kodi/jellyfin/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import requests
from six import ensure_str

from ..helper.exceptions import HTTPException
from ..helper.utils import settings
from ..helper import LazyLogger

Expand Down Expand Up @@ -268,6 +269,10 @@ def check_companion_enabled(self):
LOG.warning("Error checking companion installed state: %s", e)
if e.response.status_code == 404:
return False
except HTTPException as e:
LOG.warning("Error checking companion installed state: %s", e)

Check warning on line 273 in jellyfin_kodi/jellyfin/api.py

View check run for this annotation

Codecov / codecov/patch

jellyfin_kodi/jellyfin/api.py#L271-L273

Added lines #L271 - L273 were not covered by tests
if e.status == 404:
return False

Check warning on line 275 in jellyfin_kodi/jellyfin/api.py

View check run for this annotation

Codecov / codecov/patch

jellyfin_kodi/jellyfin/api.py#L275

Added line #L275 was not covered by tests

return None

Expand Down

0 comments on commit 1899ecb

Please sign in to comment.