@@ -57,7 +57,7 @@ async def start(self, proxy_url: str, rollout_id: str, depth: int = 1) -> None:
5757 self ._stderr_task = asyncio .create_task (self ._drain_stderr ())
5858 try :
5959 init = await asyncio .wait_for (self ._read_line (), timeout = self ._startup_timeout )
60- except asyncio . TimeoutError as e :
60+ except TimeoutError as e :
6161 await self .stop ()
6262 raise WorkerStartupError (
6363 f"Worker did not produce init line in { self ._startup_timeout } s; "
@@ -75,7 +75,7 @@ async def stop(self) -> None:
7575 try :
7676 await self ._send ({"id" : "_shutdown" , "type" : "shutdown" })
7777 await asyncio .wait_for (self ._read_line (), timeout = 2.0 )
78- except (BrokenPipeError , ConnectionResetError , asyncio . TimeoutError , WorkerProtocolError ):
78+ except (TimeoutError , BrokenPipeError , ConnectionResetError , WorkerProtocolError ):
7979 pass
8080 finally :
8181 if self ._proc .returncode is None :
@@ -85,7 +85,7 @@ async def stop(self) -> None:
8585 pass
8686 try :
8787 await asyncio .wait_for (self ._proc .wait (), timeout = 2.0 )
88- except asyncio . TimeoutError :
88+ except TimeoutError :
8989 self ._proc .kill ()
9090 await self ._proc .wait ()
9191 if self ._stderr_task and not self ._stderr_task .done ():
@@ -126,7 +126,7 @@ async def _request(self, payload: dict[str, Any]) -> dict[str, Any]:
126126 await self ._send (payload )
127127 try :
128128 resp = await asyncio .wait_for (self ._read_line (), timeout = self ._request_timeout )
129- except asyncio . TimeoutError as e :
129+ except TimeoutError as e :
130130 await self ._kill_worker ()
131131 raise WorkerProtocolError (
132132 f"Request { payload .get ('type' )} exceeded parent watchdog "
@@ -147,7 +147,7 @@ async def _kill_worker(self) -> None:
147147 return
148148 try :
149149 await asyncio .wait_for (self ._proc .wait (), timeout = 2.0 )
150- except asyncio . TimeoutError :
150+ except TimeoutError :
151151 pass
152152
153153 async def _send (self , payload : dict [str , Any ]) -> None :
0 commit comments