mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-22 03:33:08 +00:00
26447d1931
* Add exception for two-factor required * Update tools/plex-gettoken.py with 2FA exception
36 lines
683 B
Python
36 lines
683 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
|
|
class PlexApiException(Exception):
|
|
""" Base class for all PlexAPI exceptions. """
|
|
pass
|
|
|
|
|
|
class BadRequest(PlexApiException):
|
|
""" An invalid request, generally a user error. """
|
|
pass
|
|
|
|
|
|
class NotFound(PlexApiException):
|
|
""" Request media item or device is not found. """
|
|
pass
|
|
|
|
|
|
class UnknownType(PlexApiException):
|
|
""" Unknown library type. """
|
|
pass
|
|
|
|
|
|
class Unsupported(PlexApiException):
|
|
""" Unsupported client request. """
|
|
pass
|
|
|
|
|
|
class Unauthorized(BadRequest):
|
|
""" Invalid username/password or token. """
|
|
pass
|
|
|
|
|
|
class TwoFactorRequired(Unauthorized):
|
|
""" Two factor authentication required. """
|
|
pass
|