Skip to content

Commit

Permalink
Add handling of LockedUserAccountException
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Jan 9, 2022
1 parent ec2624d commit 8beb0ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plextraktsync/decorators/rate_limit.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from time import sleep

from requests import RequestException
from trakt.errors import RateLimitException, TraktInternalException
from trakt.errors import RateLimitException, TraktInternalException, LockedUserAccountException

from plextraktsync.logging import logger

Expand All @@ -21,7 +21,7 @@ def wrapper(*args, **kwargs):
while True:
try:
return fn(*args, **kwargs)
except (RateLimitException, RequestException, TraktInternalException) as e:
except (RateLimitException, RequestException, TraktInternalException, LockedUserAccountException) as e:
if retry == retries:
logger.error(f"Error: {e}")
logger.error("API didn't respond properly, script will abort now. Please try again later.")
Expand Down

0 comments on commit 8beb0ae

Please sign in to comment.