From e9ac567753f5dabfc0b27cb573dc8642f0bc4b17 Mon Sep 17 00:00:00 2001 From: FzOrb <86922118+fzorb@users.noreply.github.com> Date: Thu, 26 Dec 2024 12:26:34 +0200 Subject: [PATCH] Create output folder --- www.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/www.py b/www.py index 8230d38..07cb59a 100644 --- a/www.py +++ b/www.py @@ -39,6 +39,10 @@ def renderIndex(ct, latest): template = environment.get_template("index.html") render = template.render(ct=datetime.fromtimestamp(int(ct)), latest=latest, render=datetime.now().strftime("%Y-%m-%d %H:%M:%S"), sha256Linux=sha256Linux, sha256Windows=sha256Windows, sha512Linux=sha512Linux, sha512Windows=sha512Windows, md5Linux=md5Linux, md5Windows=md5Windows) + try: + os.mkdir(f'./www/output') + except FileExistsError: + print(f"Output folder already exists") try: os.remove("./www/output/index.html") except FileNotFoundError: