Skip to content

Commit

Permalink
pexpect exception fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vadim0x60 committed Nov 23, 2023
1 parent e973e59 commit 71fff87
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions programlib/language.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ def run(self, name, input_lines=[]):
raise RuntimeError('Program did not receive expected input') from e
except pexpect.exceptions.EOF as e:
raise RuntimeError('Program exited unexpectedly') from e
except pexpect.exceptions.ExceptionPexpect as e:
raise RuntimeError('Program failed') from e

def spawn(self, name):
child = pexpect.spawn(self.run_cmd.format(name=name))
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "programlib"
version = "9.0.1"
version = "9.0.2"
description = "Programs as Objects"
authors = ["Vadim Liventsev <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 71fff87

Please sign in to comment.