From 3edd08e8b3e5b5bb654ca6d46dbec77afba81119 Mon Sep 17 00:00:00 2001 From: boyska Date: Mon, 29 Aug 2016 18:37:57 +0200 Subject: [PATCH] make exceptions while enqueuing not blocking --- larigira/mpc.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/larigira/mpc.py b/larigira/mpc.py index d5fd336..8d9968f 100644 --- a/larigira/mpc.py +++ b/larigira/mpc.py @@ -110,6 +110,11 @@ class Player(gevent.Greenlet): elif kind == 'mpc': pass elif kind == 'add': - self.enqueue(args[0]) + try: + self.enqueue(args[0]) + except AssertionError: + raise + except Exception as exc: + self.log.exception("Error while adding to queue; bad audiogen output?") else: self.log.warning("Unknown message: %s" % str(value))