From bb126401e262442de1a900945e8ad351227283a4 Mon Sep 17 00:00:00 2001 From: Lartza Date: Tue, 10 Mar 2020 16:05:33 +0200 Subject: [PATCH 1/2] Handle KeyError for radio title --- media/radio.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/media/radio.py b/media/radio.py index f2185e5..e825055 100644 --- a/media/radio.py +++ b/media/radio.py @@ -80,10 +80,9 @@ def get_radio_title(url): except (requests.exceptions.ConnectionError, requests.exceptions.HTTPError, requests.exceptions.ReadTimeout, - requests.exceptions.Timeout) as e: - error_traceback = traceback.format_exc() - error = error_traceback.rstrip().split("\n")[-1] - log.debug("radio: unsuccessful attempts on fetching radio title (icy): " + error) + requests.exceptions.Timeout, + KeyError) as e: + log.debug("radio: unsuccessful attempts on fetching radio title (icy)") return url From 708f8a588d3dd5634566d976ef47ed62bf7daf60 Mon Sep 17 00:00:00 2001 From: Lartza Date: Tue, 10 Mar 2020 16:06:56 +0200 Subject: [PATCH 2/2] Fix ffmpeg pipe on Windows --- util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util.py b/util.py index 8738131..447b5c6 100644 --- a/util.py +++ b/util.py @@ -190,8 +190,8 @@ def pipe_no_wait(pipefd): import msvcrt import os - from ctypes import windll, byref, wintypes, GetLastError, WinError - from ctypes.wintypes import HANDLE, DWORD, POINTER, BOOL + from ctypes import windll, byref, wintypes, WinError, POINTER + from ctypes.wintypes import HANDLE, DWORD, BOOL LPDWORD = POINTER(DWORD) PIPE_NOWAIT = wintypes.DWORD(0x00000001)