From 7cae87ca7b0a3a7ce497cbd335c8ec82fe680476 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Wed, 6 Sep 2006 06:51:57 +0000 Subject: Patch #1550800: make exec a function. --- Lib/test/test_getopt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/test/test_getopt.py') diff --git a/Lib/test/test_getopt.py b/Lib/test/test_getopt.py index 9856a6a70b2..f565d2328a4 100644 --- a/Lib/test/test_getopt.py +++ b/Lib/test/test_getopt.py @@ -10,7 +10,7 @@ def expectException(teststr, expected, failure=AssertionError): """Executes a statement passed in teststr, and raises an exception (failure) if the expected exception is *not* raised.""" try: - exec teststr + exec(teststr) except expected: pass else: -- cgit v1.2.3