mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
Backport 60334:
On some systems (e.g., Ubuntu on hppa) the flush() doesn't (always) cause the exception, but the close() does.
This commit is contained in:
parent
ee50e3c734
commit
b03528ca20
1 changed files with 3 additions and 0 deletions
|
@ -36,6 +36,9 @@ try:
|
||||||
try:
|
try:
|
||||||
f.write("Y")
|
f.write("Y")
|
||||||
f.flush()
|
f.flush()
|
||||||
|
# On some systems (e.g., Ubuntu on hppa) the flush()
|
||||||
|
# doesn't cause the exception, but the close() does.
|
||||||
|
f.close()
|
||||||
except IOError:
|
except IOError:
|
||||||
if not limit_set:
|
if not limit_set:
|
||||||
raise
|
raise
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue