From e13be40b889619af8c26d7d19e924e7babcbb683 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 15 Jan 2001 16:53:58 +0000 Subject: 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. :-) --- Demo/metaclasses/Meta.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Demo/metaclasses/Meta.py b/Demo/metaclasses/Meta.py index 771205c..39cbef6 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: -- cgit v0.12