Skip to content

Commit b37c5fb

Browse files
committed
Flush stdin before attempting to read from stderr.
Fixes #17
1 parent 72b90ad commit b37c5fb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sage/conjecturing.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -460,15 +460,15 @@ def get_value(invariant, o):
460460
except:
461461
stdin.write('NaN\n')
462462

463+
stdin.flush()
464+
463465
if verbose:
464466
print("Finished computing and writing invariant values to expressions")
465467

466468
if debug:
467469
for l in sp.stderr:
468470
print('> ' + l.rstrip())
469471

470-
stdin.flush()
471-
472472
# process the output
473473
out = sp.stdout
474474

@@ -761,15 +761,15 @@ def get_value(prop, o):
761761
except:
762762
stdin.write('-1\n')
763763

764+
stdin.flush()
765+
764766
if verbose:
765767
print("Finished computing and writing property values to expressions")
766768

767769
if debug:
768770
for l in sp.stderr:
769771
print('> ' + l.rstrip())
770772

771-
stdin.flush()
772-
773773
# process the output
774774
out = sp.stdout
775775

0 commit comments

Comments
 (0)