From 4f8135bfbc4ab88a19dfab26fc042446aa1e5fbf Mon Sep 17 00:00:00 2001 From: Matthew Einhorn Date: Sun, 8 Feb 2015 10:44:55 -0500 Subject: [PATCH] Python 3 doesn't have ClassType anymore. --- kivy/lang.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kivy/lang.py b/kivy/lang.py index 087cff0aa..d75aa7f82 100755 --- a/kivy/lang.py +++ b/kivy/lang.py @@ -798,8 +798,10 @@ lang_keyvalue = re.compile('([a-zA-Z_][a-zA-Z0-9_.]*\.[a-zA-Z0-9_.]+)') lang_tr = re.compile('(_\()') # class types to check with isinstance -_cls_type = (type, types.ClassType) - +if PY2: + _cls_type = (type, types.ClassType) +else: + _cls_type = (type, ) # all the widget handlers, used to correctly unbind all the callbacks then the # widget is deleted