From b03528ca206f55071e5aaf1acfa26665bcfec473 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Sun, 27 Jan 2008 01:23:50 +0000 Subject: [PATCH] Backport 60334: On some systems (e.g., Ubuntu on hppa) the flush() doesn't (always) cause the exception, but the close() does. --- Lib/test/test_resource.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/test/test_resource.py b/Lib/test/test_resource.py index 29ce35bb0b3..28876e3a211 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