added logger to all subclasses, and added exception handling for structure creation

This commit is contained in:
Nicholas St. Germain 2018-12-06 11:39:51 -06:00
parent b27066a213
commit 59bfb4a567
4 changed files with 35 additions and 8 deletions

View file

@ -1,8 +1,7 @@
import logging
from requests import Session, Request
from datetime import datetime, timezone
from geoip2.errors import AddressNotFoundError
from requests import Session, Request
from varken.helpers import geo_lookup, hashit, connection_handler
from varken.structures import TautulliStream
@ -33,6 +32,7 @@ class TautulliAPI(object):
return
get = g['response']['data']
try:
sessions = [TautulliStream(**session) for session in get['sessions']]
except TypeError as e: