save file directly, instead of moving it there after creating it

This commit is contained in:
hyperbel 2022-11-05 11:39:40 +01:00
parent 1ce3cf210b
commit a3dcff3a55

View File

@ -65,9 +65,7 @@ def warning_log(warning):
if not os.path.exists("./static/img/qr.png"):
img = qrcode.make('127.0.0.1:5000')
type(img)
img.save("qr.png")
ort = "./static/img"
shutil.move("qr.png", ort)
img.save("./static/img/qr.png")
else:
warning_log("QR-Code ist bereits vorhanden")
@ -349,4 +347,4 @@ def page_not_found(e):
def create_app(config_filename):
app.register_error_handler(404, page_not_found)
log_server("created app")
return app
return app