ifcpatch - try both out of tree and subpackage imports #5939

This commit is contained in:
Thomas Krijnen
2025-01-07 15:43:44 +01:00
parent dbf33283ab
commit 9d1daa4dc5
+2 -1
View File
@@ -114,7 +114,8 @@ def execute(args: ArgumentsDict) -> Union[ifcopenshell.file, str]:
def get_patch_input_argument_use(recipe: str) -> Literal["REQUIRED", "SUPPORTED", "IGNORED"]:
recipe_module = sys.modules[recipe]
# try out of tree and subpackage imports
recipe_module = sys.modules.get(f"ifcpatch.recipes.{recipe}") or sys.modules.get(recipe)
return getattr(recipe_module.Patcher, "input_argument", "IGNORED")