From 9f1c93a421e46fff3d7e18872c2a8723c2b6326c Mon Sep 17 00:00:00 2001 From: Ryan Pessa Date: Thu, 13 Dec 2012 17:07:58 -0600 Subject: [PATCH] Revert "wrap try/except around getattr to prevent errors on some descriptors" This reverts commit 330f15b8cbe247bfd48092c26efc9cac084d8c49. --- kivy/_event.pyx | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/kivy/_event.pyx b/kivy/_event.pyx index 3fddecc66..8573caef6 100644 --- a/kivy/_event.pyx +++ b/kivy/_event.pyx @@ -52,16 +52,12 @@ cdef class EventDispatcher(object): attrs_found = cp[__cls__] = {} attrs = dir(__cls__) for k in attrs: - try: - uattr = getattr(__cls__, k) - except AttributeError: - pass - else: - if not isinstance(uattr, Property): - continue - if k == 'touch_down' or k == 'touch_move' or k == 'touch_up': - raise Exception('The property <%s> have a forbidden name' % k) - attrs_found[k] = uattr + uattr = getattr(__cls__, k) + if not isinstance(uattr, Property): + continue + if k == 'touch_down' or k == 'touch_move' or k == 'touch_up': + raise Exception('The property <%s> have a forbidden name' % k) + attrs_found[k] = uattr else: attrs_found = cp[__cls__]