Mercurial > cpython-lru_cache-weakref
comparison Python/pythonrun.c @ 63846:4ca497f4819c
Issue #5319: Print an error if flushing stdout fails at interpreter
shutdown.
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Sun, 08 Aug 2010 20:46:42 +0000 |
| parents | c16803bbd790 |
| children | 1bd3534136a0 |
comparison
equal
deleted
inserted
replaced
| 63845:57e631f088d7 | 63846:4ca497f4819c |
|---|---|
| 318 PyObject *tmp; | 318 PyObject *tmp; |
| 319 | 319 |
| 320 if (fout != NULL && fout != Py_None) { | 320 if (fout != NULL && fout != Py_None) { |
| 321 tmp = PyObject_CallMethod(fout, "flush", ""); | 321 tmp = PyObject_CallMethod(fout, "flush", ""); |
| 322 if (tmp == NULL) | 322 if (tmp == NULL) |
| 323 PyErr_Clear(); | 323 PyErr_WriteUnraisable(fout); |
| 324 else | 324 else |
| 325 Py_DECREF(tmp); | 325 Py_DECREF(tmp); |
| 326 } | 326 } |
| 327 | 327 |
| 328 if (ferr != NULL && ferr != Py_None) { | 328 if (ferr != NULL && ferr != Py_None) { |
