summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2008-01-27 01:23:50 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2008-01-27 01:23:50 (GMT)
commitb03528ca206f55071e5aaf1acfa26665bcfec473 (patch)
tree2ea409616a780a2aca30a7dec22e7f27200c68bd
parentee50e3c73472bfe70cdfa66db5ca21d154173be6 (diff)
downloadcpython-b03528ca206f55071e5aaf1acfa26665bcfec473.zip
cpython-b03528ca206f55071e5aaf1acfa26665bcfec473.tar.gz
cpython-b03528ca206f55071e5aaf1acfa26665bcfec473.tar.bz2
Backport 60334:
On some systems (e.g., Ubuntu on hppa) the flush() doesn't (always) cause the exception, but the close() does.
-rw-r--r--Lib/test/test_resource.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_resource.py b/Lib/test/test_resource.py
index 29ce35b..28876e3 100644
--- a/Lib/test/test_resource.py
+++ b/Lib/test/test_resource.py
@@ -36,6 +36,9 @@ try:
try:
f.write("Y")
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:
if not limit_set:
raise