From 77e6ab3b8bb7a1861960d9da2853768a8b18c586 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Fri, 8 Nov 2024 11:05:44 +0500 Subject: [PATCH] MergeProjects - temporary handle old way of passing files to merge --- src/ifcpatch/ifcpatch/recipes/MergeProjects.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ifcpatch/ifcpatch/recipes/MergeProjects.py b/src/ifcpatch/ifcpatch/recipes/MergeProjects.py index 3dd993f144..372cb039a3 100644 --- a/src/ifcpatch/ifcpatch/recipes/MergeProjects.py +++ b/src/ifcpatch/ifcpatch/recipes/MergeProjects.py @@ -57,6 +57,14 @@ class Patcher: self.filepaths = filepaths def patch(self): + if isinstance(self.filepaths, Union[str, ifcopenshell.file]): + print( + ( + "WARNING. Passing a single file/filepath will be deprecated soon for MergeProjects ifcpatch, " + "replace it with a list of file/filepaths." + ) + ) + self.filepaths = [self.filepaths] for filepath in self.filepaths: if isinstance(filepath, ifcopenshell.file): other = filepath