From: Guido van Rossum Date: Mon, 15 Jan 2001 16:53:58 +0000 (+0000) Subject: Geoffrey Gerrietts discovered that a KeyError was caught that probably X-Git-Tag: v2.1a1~264 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e13be40b889619af8c26d7d19e924e7babcbb683;p=thirdparty%2FPython%2Fcpython.git Geoffrey Gerrietts discovered that a KeyError was caught that probably should have been a NameError. I'm checking in a change that catches both, just to be sure -- I can't be bothered trying to understand this code any more. :-) --- diff --git a/Demo/metaclasses/Meta.py b/Demo/metaclasses/Meta.py index 771205cf3d06..39cbef6266f9 100644 --- a/Demo/metaclasses/Meta.py +++ b/Demo/metaclasses/Meta.py @@ -30,7 +30,7 @@ class MetaHelper: except AttributeError: try: ga = self.__formalclass__.__getattr__('__usergetattr__') - except KeyError: + except (KeyError, AttributeError): raise AttributeError, name return ga(self, name) if type(raw) != types.FunctionType: