From e0d77d0cb533674deb30bffd9d6610058b17b48b Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Wed, 12 May 2021 09:54:38 +0200 Subject: [PATCH] template test --- stream.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stream.py b/stream.py index 3e92750..13b9771 100755 --- a/stream.py +++ b/stream.py @@ -154,13 +154,13 @@ class MainHandler(tornado.web.RequestHandler): self.write("Stream not found.") def handle_render(self, provider, write): - if template is not None: + if template_js is not None and template_html is not None: stream_path = f'{self.request.path}?provider={provider}' rendered_js = template_js.generate(stream=stream_path); b64 = str(base64.b64encode(rendered_js), "ascii") script = f'data:text/javascript;charset=utf8;base64,{b64}' rendered_html = template_html.generate(script=script, videojs_version=videojs_version) - self.write(rendered) + self.write(rendered_html) else: self.set_status(404) self.write("HTML template missing.")