From 97f9ab12fbb03cddf6f2333d0827629172a868d9 Mon Sep 17 00:00:00 2001 From: Mitchell Klijs Date: Fri, 27 Apr 2018 09:55:40 +0200 Subject: [PATCH] Fix bug when no api_secret is set --- media/trakt.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/media/trakt.py b/media/trakt.py index 15a8670..832c89d 100644 --- a/media/trakt.py +++ b/media/trakt.py @@ -163,8 +163,12 @@ class Trakt: if user is None: users = self.cfg['trakt'] - users.pop('api_key') - users.pop('api_secret') + + if 'api_key' in users.keys(): + users.pop('api_key') + + if 'api_secret' in users.keys(): + users.pop('api_secret') user = list(users.keys())[0]