move exception for stream
This commit is contained in:
parent
87ee073660
commit
6005208d7f
@ -207,14 +207,15 @@ class MainHandler(tornado.web.RequestHandler):
|
|||||||
if proxy is not None:
|
if proxy is not None:
|
||||||
try:
|
try:
|
||||||
streams = proxy.stream.streams(src)
|
streams = proxy.stream.streams(src)
|
||||||
|
except Exception as e:
|
||||||
|
logger.info(e)
|
||||||
|
else:
|
||||||
for key in reversed(streams):
|
for key in reversed(streams):
|
||||||
stream = streams.get(key)
|
stream = streams.get(key)
|
||||||
logger.info(stream)
|
logger.info(stream)
|
||||||
if hasattr(stream, "url"):
|
if hasattr(stream, "url"):
|
||||||
upstream = stream.url
|
upstream = stream.url
|
||||||
break
|
break
|
||||||
except Exception as e:
|
|
||||||
logger.info(e)
|
|
||||||
else:
|
else:
|
||||||
logger.info(f'invalid provider ({provider})')
|
logger.info(f'invalid provider ({provider})')
|
||||||
self.set_status(404)
|
self.set_status(404)
|
||||||
|
Loading…
Reference in New Issue
Block a user