SickGear/sickbeard/indexers/indexer_exceptions.py
Prinz23 653a717f42 Change increase performance by reducing TVDb API requests with a global token.
Change raise tvdb_error if any of the episodes pages return an error instead of an incomplete episode list.
Handle expired token.
2017-07-21 22:03:52 +01:00

30 lines
No EOL
1.1 KiB
Python

#!/usr/bin/env python2
#encoding:utf-8
#project:indexer_api
#license:unlicense (http://unlicense.org/)
"""Custom exceptions used or raised by indexer_api"""
from lib.tvdb_api.tvdb_exceptions import \
tvdb_exception, tvdb_attributenotfound, tvdb_episodenotfound, tvdb_error, \
tvdb_seasonnotfound, tvdb_shownotfound, tvdb_userabort, tvdb_tokenexpired
indexerExcepts = [
'indexer_exception', 'indexer_error', 'indexer_userabort',
'indexer_shownotfound', 'indexer_seasonnotfound', 'indexer_episodenotfound',
'indexer_attributenotfound', 'indexer_authenticationerror']
tvdbExcepts = [
'tvdb_exception', 'tvdb_error', 'tvdb_userabort', 'tvdb_shownotfound',
'tvdb_seasonnotfound', 'tvdb_episodenotfound', 'tvdb_attributenotfound',
'tvdb_tokenexpired']
# link API exceptions to our exception handler
indexer_exception = tvdb_exception
indexer_error = tvdb_error
indexer_authenticationerror = tvdb_tokenexpired
indexer_userabort = tvdb_userabort
indexer_attributenotfound = tvdb_attributenotfound
indexer_episodenotfound = tvdb_episodenotfound
indexer_seasonnotfound = tvdb_seasonnotfound
indexer_shownotfound = tvdb_shownotfound