aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_exceptions.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_exceptions.py')
-rw-r--r--Lib/test/test_exceptions.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py
index 7ee6e219f23..cf7c50dbe09 100644
--- a/Lib/test/test_exceptions.py
+++ b/Lib/test/test_exceptions.py
@@ -19,10 +19,11 @@ fp.close()
fp = open(TESTFN, 'r')
savestdin = sys.stdin
try:
- sys.stdin = fp
- x = raw_input()
-except EOFError:
- pass
+ try:
+ sys.stdin = fp
+ x = raw_input()
+ except EOFError:
+ pass
finally:
sys.stdin = savestdin
fp.close()