From 0333df5f87f9f863067ccfbc24c443dd4e66362d Mon Sep 17 00:00:00 2001 From: Berehum Date: Tue, 4 Feb 2025 10:05:17 +0100 Subject: [PATCH] Remove extensive error logging for spotify connection issues. --- amelie/narrowcasting/views.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/amelie/narrowcasting/views.py b/amelie/narrowcasting/views.py index f10d3e0..9be4d57 100644 --- a/amelie/narrowcasting/views.py +++ b/amelie/narrowcasting/views.py @@ -124,9 +124,9 @@ def room_spotify_now_playing(request): params={"market": "from_token"}, headers={"Authorization": "Bearer {}".format(assoc.access_token)} ) - except ConnectionError as e: + except ConnectionError: log = logging.getLogger("amelie.narrowcasting.views.room_spotify_now_playing") - log.warning(f"ConnectionError while retrieving player info: {e}") + log.warning(f"ConnectionError while retrieving player info") # Return empty response return JsonResponse({}) @@ -169,9 +169,9 @@ def room_spotify_pause(request): res = requests.put("https://api.spotify.com/v1/me/player/pause", headers={"Authorization": "Bearer {}".format(assoc.access_token)} ) - except ConnectionError as e: + except ConnectionError: log = logging.getLogger("amelie.narrowcasting.views.room_spotify_now_playing") - log.warning(f"ConnectionError while pausing Spotify player: {e}") + log.warning(f"ConnectionError while pausing Spotify player") # Return empty response return JsonResponse({}) @@ -214,9 +214,9 @@ def room_spotify_play(request): res = requests.put("https://api.spotify.com/v1/me/player/play", headers={"Authorization": "Bearer {}".format(assoc.access_token)} ) - except ConnectionError as e: + except ConnectionError: log = logging.getLogger("amelie.narrowcasting.views.room_spotify_now_playing") - log.warning(f"ConnectionError while unpausing Spotify player: {e}") + log.warning(f"ConnectionError while unpausing Spotify player") # Return empty response return JsonResponse({})