mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 22:33:33 +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 ...")
|
print("# Loading patch recipe ...")
|
||||||
recipes = getattr(__import__("ifcpatch.recipes.{}".format(args["recipe"])), "recipes")
|
recipes = getattr(__import__("ifcpatch.recipes.{}".format(args["recipe"])), "recipes")
|
||||||
recipe = getattr(recipes, args["recipe"])
|
recipe = getattr(recipes, args["recipe"])
|
||||||
try:
|
if recipe.Patcher.__init__.__doc__ is not None:
|
||||||
# We unpack the arguments if the Patcher has been type-hinted and docstringed
|
|
||||||
patcher = recipe.Patcher(args["input"], ifc_file, logger, *args["arguments"])
|
patcher = recipe.Patcher(args["input"], ifc_file, logger, *args["arguments"])
|
||||||
except TypeError:
|
else:
|
||||||
patcher = recipe.Patcher(args["input"], ifc_file, logger, args["arguments"])
|
patcher = recipe.Patcher(args["input"], ifc_file, logger, args["arguments"])
|
||||||
print("# Patching ...")
|
print("# Patching ...")
|
||||||
patcher.patch()
|
patcher.patch()
|
||||||
|
|||||||
Reference in New Issue
Block a user