From: Finn Bock Date: Sun, 9 Dec 2001 16:06:29 +0000 (+0000) Subject: test(): Avoid a UnboundLocalError when a method is missing from both the string X-Git-Tag: v2.2.1c1~456 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ed69aeedb9031d632c169c8c570777426842dce0;p=python test(): Avoid a UnboundLocalError when a method is missing from both the string module and from string methods. This closes patch "[ #490811 ] Jython and test_string". --- diff --git a/Lib/test/test_string.py b/Lib/test/test_string.py index 3574719df4..4c5a60aa2c 100644 --- a/Lib/test/test_string.py +++ b/Lib/test/test_string.py @@ -21,6 +21,7 @@ def test(name, input, output, *args): value = apply(f, (input,) + args) except: value = sys.exc_type + f = name if value != output: if verbose: print 'no'