Add handling of LockedUserAccountException
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
@@ -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.")
