diff --git a/stream.py b/stream.py index a64a589..a46d904 100755 --- a/stream.py +++ b/stream.py @@ -21,7 +21,10 @@ class MainHandler(tornado.web.RequestHandler): except Exception as e: self.write(str(e)) else: - self.redirect(endpoint, status=303) + if endpoint is None: + self.write("stream not found") + else: + self.redirect(endpoint, status=303) try: app_web = tornado.web.Application([(tornado.routing.AnyMatches(), MainHandler)]) app_web.listen(8080)