Skip to content

Commit

Permalink
Fix bug when registering hooks with execution context
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandf committed Feb 10, 2024
1 parent 0ae4cb1 commit bcd53f6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/engine/src/owe_python_sdk/runtime/execution_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ def add_hook(self, exit_code: int, hook: callable, *args, **kwargs):
if not callable(hook):
raise TypeError("Error registering hook. Argument 'hook' must be callable")

self._exit_hooks(exit_code, partial(hook, *args, **kwargs))

return self
self._exit_hooks[exit_code].append(partial(hook, *args, **kwargs))


def get_input(self, input_id, default=None):
Expand Down

0 comments on commit bcd53f6

Please sign in to comment.