made more verbose errors for TypeError

This commit is contained in:
Nicholas St. Germain 2018-12-06 12:04:02 -06:00
parent 59bfb4a567
commit 743f35842e
3 changed files with 12 additions and 11 deletions

View file

@ -40,7 +40,7 @@ class SonarrAPI(object):
try:
tv_shows = [TVShow(**show) for show in get]
except TypeError as e:
self.logger.error('TypeError has occurred : %s', e)
self.logger.error('TypeError has occurred : %s while creating TVShow structure', e)
return
# Add show to missing list if file does not exist
@ -90,7 +90,7 @@ class SonarrAPI(object):
try:
tv_shows = [TVShow(**show) for show in get]
except TypeError as e:
self.logger.error('TypeError has occurred : %s', e)
self.logger.error('TypeError has occurred : %s while creating TVShow structure', e)
return
for show in tv_shows:
@ -140,7 +140,7 @@ class SonarrAPI(object):
try:
download_queue = [Queue(**show) for show in get]
except TypeError as e:
self.logger.error('TypeError has occurred : %s', e)
self.logger.error('TypeError has occurred : %s while creating Queue structure', e)
return
for show in download_queue: