From 6005208d7f24b43bc7fb49273271aad1aeeebb8a Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Thu, 13 May 2021 09:24:20 +0200 Subject: [PATCH] move exception for stream --- stream.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stream.py b/stream.py index 07373e3..412efe0 100755 --- a/stream.py +++ b/stream.py @@ -207,14 +207,15 @@ class MainHandler(tornado.web.RequestHandler): if proxy is not None: try: streams = proxy.stream.streams(src) + except Exception as e: + logger.info(e) + else: for key in reversed(streams): stream = streams.get(key) logger.info(stream) if hasattr(stream, "url"): upstream = stream.url break - except Exception as e: - logger.info(e) else: logger.info(f'invalid provider ({provider})') self.set_status(404)