mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 22:11:36 +00:00
@@ -158,9 +158,6 @@ def run(
|
|||||||
for listener in pre_listeners.get(usecase_path, {}).values():
|
for listener in pre_listeners.get(usecase_path, {}).values():
|
||||||
listener(usecase_path, ifc_file, settings)
|
listener(usecase_path, ifc_file, settings)
|
||||||
|
|
||||||
# see #4531
|
|
||||||
if usecase_path in ARGUMENTS_DEPRECATION:
|
|
||||||
usecase_path, settings = ARGUMENTS_DEPRECATION[usecase_path](usecase_path, settings)
|
|
||||||
|
|
||||||
# TODO: settings serialization for client-server systems
|
# TODO: settings serialization for client-server systems
|
||||||
# def serialise_entity_instance(entity):
|
# def serialise_entity_instance(entity):
|
||||||
@@ -304,10 +301,15 @@ def wrap_usecase(usecase_path, usecase):
|
|||||||
|
|
||||||
def wrapper(*args, should_run_listeners: bool = True, **settings):
|
def wrapper(*args, should_run_listeners: bool = True, **settings):
|
||||||
ifc_file = args[0] if args else None
|
ifc_file = args[0] if args else None
|
||||||
|
nonlocal usecase_path
|
||||||
if should_run_listeners:
|
if should_run_listeners:
|
||||||
for listener in pre_listeners.get(usecase_path, {}).values():
|
for listener in pre_listeners.get(usecase_path, {}).values():
|
||||||
listener(usecase_path, ifc_file, settings)
|
listener(usecase_path, ifc_file, settings)
|
||||||
|
|
||||||
|
# see #4531
|
||||||
|
if usecase_path in ARGUMENTS_DEPRECATION:
|
||||||
|
usecase_path, settings = ARGUMENTS_DEPRECATION[usecase_path](usecase_path, settings)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
result = usecase(*args, **settings)
|
result = usecase(*args, **settings)
|
||||||
except TypeError as e:
|
except TypeError as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user