Merge pull request #96 from Lartza/develop

Couple fixes
This commit is contained in:
Terry Geng 2020-03-10 22:57:19 +08:00 committed by GitHub
commit e58b7233ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View File

@ -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

View File

@ -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)