add error

This commit is contained in:
Roy Olav Purser 2021-04-30 11:26:21 +02:00
parent 46a8dd89ba
commit 76a2947e7e
No known key found for this signature in database
GPG Key ID: 0BA77797F072BC52

View File

@ -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)