Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Simplify

Tomas Valenta5bacc090f6a3
diff --git a/packages/python-sdk/e2b/sandbox/process.py b/packages/python-sdk/e2b/sandbox/process.py
index 04d0df8cf..af6856cc5 100644
--- a/packages/python-sdk/e2b/sandbox/process.py
+++ b/packages/python-sdk/e2b/sandbox/process.py
@@ -332,12 +332,8 @@ class ProcessManager:
try:
if len(params) == 0:
on_exit()
- elif len(params) == 1:
- on_exit(output.exit_code or 0)
else:
- raise TypeError(
- f"on_exit callback must take 0 or 1 arguments, not {len(params)}"
- )
+ on_exit(output.exit_code or 0)
except TypeError as error:
logger.exception(f"Error in on_exit callback: {error}")
future_exit_handler_finish(output)