Skip to content

Commit

Permalink
Mention time limit in timeout exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
klieret committed Nov 25, 2024
1 parent 2620b3c commit 4b17a05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/swerex/runtime/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ async def _run_interactive(self, action: BashAction) -> BashObservation:
expect_index = self.shell.expect(expect_strings, timeout=action.timeout) # type: ignore
matched_expect_string = expect_strings[expect_index]
except pexpect.TIMEOUT as e:
msg = f"timeout while running command {action.command!r}"
msg = f"timeout after {action.timeout} seconds while running command {action.command!r}"
raise CommandTimeoutError(msg) from e
output: str = _strip_control_chars(self.shell.before).strip() # type: ignore
if action.is_interactive_quit:
Expand Down Expand Up @@ -277,7 +277,7 @@ async def _run_normal(self, action: BashAction) -> BashObservation:
expect_index = self.shell.expect(expect_strings, timeout=action.timeout) # type: ignore
matched_expect_string = expect_strings[expect_index]
except pexpect.TIMEOUT as e:
msg = f"timeout while running command {action.command!r}"
msg = f"timeout after {action.timeout} seconds while running command {action.command!r}"
raise CommandTimeoutError(msg) from e
output: str = _strip_control_chars(self.shell.before).strip() # type: ignore

Expand Down

0 comments on commit 4b17a05

Please sign in to comment.