From e44872e523b10770a8ce806a57b1d755d5b53710 Mon Sep 17 00:00:00 2001 From: aronwk-aaron Date: Sat, 17 Dec 2022 01:55:55 -0600 Subject: [PATCH] delete temporary imports --- app/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/__init__.py b/app/__init__.py index 0462f91..e9003ca 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -105,11 +105,15 @@ def create_app(): # Extract the brickdb if it's not already extracted materials = pathlib.Path(f'{app.config["CACHE_LOCATION"]}Materials.xml') if not materials.is_file(): + # unzip the brickdb, and remove the import after from zipfile import ZipFile with ZipFile(f"{app.config['CLIENT_LOCATION']}res/brickdb.zip","r") as zip_ref: zip_ref.extractall(app.config["CACHE_LOCATION"]) + del ZipFile + # copy over the brick primitives, and remove the import after from shutil import copytree copytree(f"{app.config['CLIENT_LOCATION']}res/brickprimitives", f"{app.config['CACHE_LOCATION']}brickprimitives") + del copytree return app