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:
Neal Norwitz 2008-01-27 01:23:50 +00:00
parent ee50e3c734
commit b03528ca20

View file

@ -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