From 84f6dc9ade1abf89cdf6d0194929a0a981758032 Mon Sep 17 00:00:00 2001 From: J0J0 Todos Date: Thu, 7 Nov 2024 11:32:37 +0100 Subject: [PATCH] Fix exception in discogs_connect when self.me is passed and we are offline. --- discodos/model_collection.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/discodos/model_collection.py b/discodos/model_collection.py index abab144..1c9d4b2 100644 --- a/discodos/model_collection.py +++ b/discodos/model_collection.py @@ -21,13 +21,13 @@ def discogs_connect(self, user_token=None, app_identifier=None, discogs=None): """Discogs connect try,except wrapper sets attributes d, me and ONLINE. """ - if discogs: - self.d = discogs - self.me = discogs.identity() - self.ONLINE = True - return self.ONLINE - try: + if discogs: + self.d = discogs + self.me = discogs.identity() + self.ONLINE = True + return self.ONLINE + self.d = discogs_client.Client( app_identifier, user_token=user_token )