From 117e8c943f9dc080efd9f7237c5beaab18a139ab Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Sat, 10 Oct 2020 23:25:21 +0200 Subject: [PATCH] linting --- music_assistant/helpers/process.py | 2 +- music_assistant/managers/music.py | 2 +- music_assistant/managers/streams.py | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/music_assistant/helpers/process.py b/music_assistant/helpers/process.py index 95f15437..b4ceaab9 100644 --- a/music_assistant/helpers/process.py +++ b/music_assistant/helpers/process.py @@ -21,7 +21,7 @@ from typing import AsyncGenerator, List, Optional LOGGER = logging.getLogger("mass.helpers") -class AsyncProcess(object): +class AsyncProcess: """Implementation of a (truly) non blocking subprocess.""" def __init__( diff --git a/music_assistant/managers/music.py b/music_assistant/managers/music.py index 0f86b36b..41988e5a 100755 --- a/music_assistant/managers/music.py +++ b/music_assistant/managers/music.py @@ -54,7 +54,7 @@ def sync_task(desc): EVENT_MUSIC_SYNC_STATUS, method_class.running_sync_jobs ) await func(*args) - LOGGER.info("Finished syncing %s for provider %s", desc, prov_id) + LOGGER.debug("Finished syncing %s for provider %s", desc, prov_id) method_class.running_sync_jobs.remove(sync_job) method_class.mass.signal_event( EVENT_MUSIC_SYNC_STATUS, method_class.running_sync_jobs diff --git a/music_assistant/managers/streams.py b/music_assistant/managers/streams.py index ad9900f4..0a2da096 100755 --- a/music_assistant/managers/streams.py +++ b/music_assistant/managers/streams.py @@ -108,11 +108,12 @@ class StreamManager: await asyncio.wait([fill_buffer_task]) + # pylint: disable=broad-except except ( GeneratorExit, asyncio.CancelledError, Exception, - ) as exc: # pylint: disable=broad-except + ) as exc: cancelled = True fill_buffer_task.cancel() LOGGER.debug( @@ -164,11 +165,12 @@ class StreamManager: async for chunk in sox_proc.iterate_chunks(): yield chunk await asyncio.wait([fill_buffer_task]) + # pylint: disable=broad-except except ( GeneratorExit, asyncio.CancelledError, Exception, - ) as exc: # pylint: disable=broad-except + ) as exc: cancelled = True fill_buffer_task.cancel() LOGGER.debug( -- 2.34.1