some fixes for the linter
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Mon, 14 Sep 2020 06:37:17 +0000 (08:37 +0200)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Mon, 14 Sep 2020 06:37:17 +0000 (08:37 +0200)
music_assistant/http_streamer.py
tests/__init__.py [new file with mode: 0644]

index 31b90b758b5c96c7b4b32bc976b10a2cbc05a65b..83983f445864b306f15ece2aeb4910f17a287ba7 100755 (executable)
@@ -74,9 +74,9 @@ class HTTPStreamer:
         # let the streaming begin!
         try:
             await asyncio.gather(bg_task)
-        except (asyncio.CancelledError, asyncio.TimeoutError):
+        except (asyncio.CancelledError, asyncio.TimeoutError) as exc:
             cancelled.set()
-            raise asyncio.CancelledError()
+            raise exc  # re-raise
         return resp
 
     def __get_queue_item_stream(self, player_id, queue_item, buffer, cancelled):
diff --git a/tests/__init__.py b/tests/__init__.py
new file mode 100644 (file)
index 0000000..0a066f8
--- /dev/null
@@ -0,0 +1 @@
+"""Tests for Music Assistant go here."""