From 9c80e1f4a69eff903a324bda10abfdeec248f7a4 Mon Sep 17 00:00:00 2001 From: Fernando <fernandog@users.noreply.github.com> Date: Wed, 15 Jul 2015 13:57:31 -0300 Subject: [PATCH] Fix trakt return @miigotu --- lib/trakt/trakt.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/trakt/trakt.py b/lib/trakt/trakt.py index c5293ee32..bb176f9fb 100644 --- a/lib/trakt/trakt.py +++ b/lib/trakt/trakt.py @@ -110,13 +110,11 @@ class TraktAPI(): elif code in (500,501,503,504,520,521,522): #http://docs.trakt.apiary.io/#introduction/status-codes logger.log(u'Trakt may have some issues and it\'s unavailable. Try again later please', logger.WARNING) - return {} elif code is 404: logger.log(u'Trakt error (404) the resource does not exist: %s' % url + path, logger.WARNING) - return {} else: logger.log(u'Could not connect to Trakt. Code error: {0}'.format(code), logger.ERROR) - return {} + return {} # check and confirm trakt call did not fail if isinstance(resp, dict) and resp.get('status', False) == 'failure': -- GitLab