Catch additional exception for Plex account login failures (#37143)

This commit is contained in:
jjlawren authored and GitHub committed 2020-06-26 10:30:44 -07:00
1 parent 7d74b74570
commit fe5bf96e5d
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -4,7 +4,7 @@ import ssl
import time
from urllib.parse import urlparse
from plexapi.exceptions import NotFound, Unauthorized
from plexapi.exceptions import BadRequest, NotFound, Unauthorized
import plexapi.myplex
import plexapi.playqueue
import plexapi.server
@@ -98,7 +98,7 @@ class PlexServer:
if not self._plex_account and self._use_plex_tv:
try:
self._plex_account = plexapi.myplex.MyPlexAccount(token=self._token)
except Unauthorized:
except (BadRequest, Unauthorized):
self._use_plex_tv = False
_LOGGER.error("Not authorized to access plex.tv with provided token")
raise