summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 4fd5149..b2d5464 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -1453,12 +1453,13 @@ PyRun_InteractiveOneObject(FILE *fp, PyObject *filename, PyCompilerFlags *flags)
d = PyModule_GetDict(m);
v = run_mod(mod, filename, d, d, flags, arena);
PyArena_Free(arena);
- flush_io();
if (v == NULL) {
PyErr_Print();
+ flush_io();
return -1;
}
Py_DECREF(v);
+ flush_io();
return 0;
}