diff options
author | Kristján Valur Jónsson <kristjan@ccpgames.com> | 2009-03-24 13:51:36 (GMT) |
---|---|---|
committer | Kristján Valur Jónsson <kristjan@ccpgames.com> | 2009-03-24 13:51:36 (GMT) |
commit | 8915e0e43ac0c8a5c0c96b5a656062cc83188d7f (patch) | |
tree | d6e5c1b16fb74322722b782ef32efe9fb47720cc /Modules | |
parent | dc7c128d74876bf0bcef61e34bd858a675b7a43c (diff) | |
download | cpython-8915e0e43ac0c8a5c0c96b5a656062cc83188d7f.zip cpython-8915e0e43ac0c8a5c0c96b5a656062cc83188d7f.tar.gz cpython-8915e0e43ac0c8a5c0c96b5a656062cc83188d7f.tar.bz2 |
http://bugs.python.org/issue5544
Fix to the last checkin, correctly raise an exception on failure.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_fileio.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/_fileio.c b/Modules/_fileio.c index 0006561..cc1cbef 100644 --- a/Modules/_fileio.c +++ b/Modules/_fileio.c @@ -84,8 +84,10 @@ internal_close(PyFileIOObject *self) if (err < 0) save_errno = errno; Py_END_ALLOW_THREADS - } else - save_errno = errno; + } else { + save_errno = errno; + err = -1; + } } if (err < 0) { errno = save_errno; |