From 5a790dc298c311f4da117b0babdff437fb576319 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 18 Dec 2025 05:32:02 +0100 Subject: [PATCH] SpotiClub Patch v0.2.0 --- librespot/core.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/librespot/core.py b/librespot/core.py index d2f8d29..7d20c74 100644 --- a/librespot/core.py +++ b/librespot/core.py @@ -1470,8 +1470,10 @@ class Session(Closeable, MessageListener, SubListener): ) time.sleep(1) - # All attempts failed: log and raise a clear, user-friendly - # error instead of crashing with a low-level struct.error. + # All attempts failed: log a clear, user-friendly error and + # terminate the process without a traceback. This prevents + # callers (like Zotify) from incorrectly retrying OAuth when + # the failure is purely network-related. friendly_message = ( "Failed to connect to Spotify after " f"{max_attempts} attempts. " @@ -1480,8 +1482,9 @@ class Session(Closeable, MessageListener, SubListener): "This is usually a network or firewall issue." ) self.logger.error("%s Last error: %s", friendly_message, last_exc) - print(friendly_message) - raise RuntimeError(friendly_message) from last_exc + # Exit with a non-zero status but no stack trace; the + # logger message above provides the user-facing explanation. + raise SystemExit(1) def content_feeder(self) -> PlayableContentFeeder: """ """