From 69f3587f4da65054b16ae1d46cfaa2d7c2d1f5a7 Mon Sep 17 00:00:00 2001 From: Brendan Howell Date: Fri, 22 May 2020 10:30:23 +0200 Subject: [PATCH] add some debugging for pre-rendered html --- screenless/bureau/bureau.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/screenless/bureau/bureau.py b/screenless/bureau/bureau.py index 99c20fd..1cb78e3 100644 --- a/screenless/bureau/bureau.py +++ b/screenless/bureau/bureau.py @@ -400,7 +400,7 @@ class Bureau(object): string=templ.render_unicode(**kwargs)) if self.log.getEffectiveLevel == logging.DEBUG: - with html_out as open("/tmp/debug.html", "w"): + with open("/tmp/debug.html", "w") as html_out: html_out.write(html_rendered) self.log.debug("debug html output at /tmp/debug.html")