mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
ifctester - save results to temp directory
the way it was intended to originally but absolute paths of ifc and ids got in the way Replaced TemporaryDirectory with mkdtemp as sometimes .html report doesn't open fast enough and directory gets deleted. Also need to keep the directory to make sure .ods is not removed.
This commit is contained in:
@@ -70,9 +70,11 @@ class ExecuteIfcTester(bpy.types.Operator):
|
||||
def execute_tester(self, ifc_data: ifcopenshell.file, ifc_path: str, specs_path: str) -> Union[set[str], None]:
|
||||
props = bpy.context.scene.IfcTesterProperties
|
||||
|
||||
with tempfile.TemporaryDirectory() as dirpath:
|
||||
# No need for if-statement, just postponing lots of diffs.
|
||||
if True:
|
||||
dirpath = tempfile.mkdtemp()
|
||||
start = time.time()
|
||||
output = Path(os.path.join(dirpath, "{}_{}.html".format(ifc_path, os.path.basename(specs_path))))
|
||||
output = Path(os.path.join(dirpath, "{}_{}.html".format(Path(ifc_path).name, Path(specs_path).name)))
|
||||
|
||||
try:
|
||||
specs = ifctester.ids.open(specs_path)
|
||||
|
||||
Reference in New Issue
Block a user