diff options
author | 2018-03-16 15:44:52 +0100 | |
---|---|---|
committer | 2018-03-16 15:44:52 +0100 | |
commit | fa84854ad1376d790739eb58d9d85d6864373ef8 (patch) | |
tree | d5881943d0549f89810d1fc8d7ea2ffb938222bf /doc | |
parent | 8f3717845f5fa3bebddfe5246f4646bc062ac244 (diff) | |
parent | efcff2e4ae6cabaf90fec1d5bd0cec0f5d4a3a4a (diff) |
Merge PR #7005: Fix coqtop timeout
Diffstat (limited to 'doc')
-rw-r--r-- | doc/tools/coqrst/repl/coqtop.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/doc/tools/coqrst/repl/coqtop.py b/doc/tools/coqrst/repl/coqtop.py index 2df97d3dc..efb5cb550 100644 --- a/doc/tools/coqrst/repl/coqtop.py +++ b/doc/tools/coqrst/repl/coqtop.py @@ -59,7 +59,7 @@ class CoqTop: def next_prompt(self): "Wait for the next coqtop prompt, and return the output preceeding it." - self.coqtop.expect(CoqTop.COQTOP_PROMPT, timeout = 1) + self.coqtop.expect(CoqTop.COQTOP_PROMPT, timeout = 10) return self.coqtop.before def sendone(self, sentence): @@ -70,9 +70,12 @@ class CoqTop: """ # Suppress newlines, but not spaces: they are significant in notations sentence = re.sub(r"[\r\n]+", " ", sentence).strip() - # print("Sending {}".format(sentence)) self.coqtop.sendline(sentence) - output = self.next_prompt() + try: + output = self.next_prompt() + except: + print("Error while sending the following sentence to coqtop: {}".format(sentence)) + raise # print("Got {}".format(repr(output))) return output |