def wrap(handler): if handler.func_code.co_argcount == 0: return nodetoolkit.createAction(handler.func_name, lambda arg: handler(), metadata) else: return nodetoolkit.createAction(handler.func_name, handler, metadata)
def create_local_action(name, handler, metadata=None): return nodetoolkit.createAction(name, handler, metadata)