Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Remove redundant exception raising; Remove unnecessary disconnect
Tomas Valenta69f4567212b1
diff --git a/packages/python-sdk/e2b/sandbox_async/filesystem/watch_handle.py b/packages/python-sdk/e2b/sandbox_async/filesystem/watch_handle.pyindex aefdb05bd..aa420cd71 100644--- a/packages/python-sdk/e2b/sandbox_async/filesystem/watch_handle.py+++ b/packages/python-sdk/e2b/sandbox_async/filesystem/watch_handle.py@@ -39,8 +39,6 @@ class AsyncWatchHandle:)except Exception as e:raise handle_rpc_exception(e)- finally:- await self.close()async def _handle_events(self):try:diff --git a/packages/python-sdk/e2b/sandbox_async/process/process_handle.py b/packages/python-sdk/e2b/sandbox_async/process/process_handle.pyindex 206de17d1..dea12db3a 100644--- a/packages/python-sdk/e2b/sandbox_async/process/process_handle.py+++ b/packages/python-sdk/e2b/sandbox_async/process/process_handle.py@@ -116,22 +116,6 @@ class AsyncProcessHandle:except Exception as e:self._iteration_exception = handle_rpc_exception(e)- if self._iteration_exception:- raise self._iteration_exception-- if self._result is None:- raise Exception("Process ended without an end event")-- if self._result.exit_code != 0:- raise ProcessExitException(- stdout=self._stdout,- stderr=self._stderr,- exit_code=self._result.exit_code,- error=self._result.error,- )-- return self._result-async def wait(self) -> ProcessResult:await self._waitif self._iteration_exception:@@ -151,5 +135,4 @@ class AsyncProcessHandle:return self._resultasync def kill(self):- # self._wait.cancel()await self._handle_kill()diff --git a/packages/python-sdk/e2b/sandbox_sync/process/main.py b/packages/python-sdk/e2b/sandbox_sync/process/main.pyindex 4be6120e4..28002ddec 100644--- a/packages/python-sdk/e2b/sandbox_sync/process/main.py+++ b/packages/python-sdk/e2b/sandbox_sync/process/main.py@@ -25,8 +25,8 @@ class Process:self._connection_config = connection_configself._rpc = process_connect.ProcessClient(envd_api_url,- # TODO: Fix and enable compression again — the headers compression is not solved.- # compressor=connect.GzipCompressor,+ # TODO: Fix and enable compression again — the headers compression is not solved for streaming.+ # compressor=e2b_connect.GzipCompressor,pool=pool,)diff --git a/packages/python-sdk/e2b/sandbox_sync/process/process_handle.py b/packages/python-sdk/e2b/sandbox_sync/process/process_handle.pyindex deac5e413..f803bd6ed 100644--- a/packages/python-sdk/e2b/sandbox_sync/process/process_handle.py+++ b/packages/python-sdk/e2b/sandbox_sync/process/process_handle.py@@ -44,7 +44,6 @@ class ProcessHandle:None,]:for event in self._events:- print("event ->>>>", event)if event.event.HasField("data"):if event.event.data.stdout:out = event.event.data.stdout.decode()