aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests/test_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/tests/test_test.py')
-rw-r--r--setuptools/tests/test_test.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py
index 87ccaf44..04134ec5 100644
--- a/setuptools/tests/test_test.py
+++ b/setuptools/tests/test_test.py
@@ -107,8 +107,9 @@ class TestTestTest(unittest.TestCase):
old_stdout = sys.stdout
sys.stdout = StringIO()
try:
- cmd.run()
- except SystemExit: # The test runner calls sys.exit, stop that making an error.
- pass
+ try: # try/except/finally doesn't work in Python 2.4, so we need nested try-statements.
+ cmd.run()
+ except SystemExit: # The test runner calls sys.exit, stop that making an error.
+ pass
finally:
sys.stdout = old_stdout