1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-08-13 16:53:54 -04:00

AniDB: Fix generating exception on timeout in PP

This commit is contained in:
Alexandre Beloin 2015-02-17 11:04:58 -05:00
parent 1ad9ed4539
commit 1c33d1af82

View File

@ -1008,13 +1008,17 @@ def set_up_anidb_connection():
if not sickbeard.ADBA_CONNECTION:
anidb_logger = lambda x: logger.log("ANIDB: " + str(x), logger.DEBUG)
sickbeard.ADBA_CONNECTION = adba.Connection(keepAlive=True, log=anidb_logger)
try:
sickbeard.ADBA_CONNECTION = adba.Connection(keepAlive=True, log=anidb_logger)
except Exception as e:
logger.log(u"anidb exception msg: " + str(e))
return False
if not sickbeard.ADBA_CONNECTION.authed():
try:
sickbeard.ADBA_CONNECTION.auth(sickbeard.ANIDB_USERNAME, sickbeard.ANIDB_PASSWORD)
except Exception, e:
logger.log(u"exception msg: " + str(e))
logger.log(u"anidb exception msg: " + str(e))
return False
else:
return True