Skip to content

Commit

Permalink
core: Work around rocq-archive/coq-serapi#212
Browse files Browse the repository at this point in the history
  • Loading branch information
cpitclaudel committed Jun 20, 2020
1 parent 7c836f0 commit 1239b24
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion alectryon/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,12 @@ def reset(self):

def next_sexp(self):
"""Wait for the next sertop prompt, and return the output preceding it."""
response = self.last_response = self.sertop.stdout.readline()
response = self.sertop.stdout.readline()
if not response:
# https://github.com/ejgallego/coq-serapi/issues/212
MSG = "SerTop printed an empty line. Last response: {!r}."
raise ValueError(MSG.format(self.last_response))
self.last_response = response
sexp = sx.load(response)
debug(response, '<< ')
return sexp
Expand Down

0 comments on commit 1239b24

Please sign in to comment.