Create output folder
This commit is contained in:
parent
e011b11987
commit
e9ac567753
4
www.py
4
www.py
@ -39,6 +39,10 @@ def renderIndex(ct, latest):
|
|||||||
|
|
||||||
template = environment.get_template("index.html")
|
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)
|
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:
|
try:
|
||||||
os.remove("./www/output/index.html")
|
os.remove("./www/output/index.html")
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
|
Loading…
Reference in New Issue
Block a user