mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Fix https://github.com/IfcOpenShell/IfcOpenShell/issues/1664 : IFCPatch wouldn't correctly unpack un-hinted arguments
This commit is contained in:
@@ -37,10 +37,9 @@ def execute(args, is_library=None):
|
||||
print("# Loading patch recipe ...")
|
||||
recipes = getattr(__import__("ifcpatch.recipes.{}".format(args["recipe"])), "recipes")
|
||||
recipe = getattr(recipes, args["recipe"])
|
||||
try:
|
||||
# We unpack the arguments if the Patcher has been type-hinted and docstringed
|
||||
if recipe.Patcher.__init__.__doc__ is not None:
|
||||
patcher = recipe.Patcher(args["input"], ifc_file, logger, *args["arguments"])
|
||||
except TypeError:
|
||||
else:
|
||||
patcher = recipe.Patcher(args["input"], ifc_file, logger, args["arguments"])
|
||||
print("# Patching ...")
|
||||
patcher.patch()
|
||||
|
||||
Reference in New Issue
Block a user