diff options
Diffstat (limited to 'meta/lib/oe/maketype.py')
-rw-r--r-- | meta/lib/oe/maketype.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/meta/lib/oe/maketype.py b/meta/lib/oe/maketype.py index f88981dd90..c36e7b5604 100644 --- a/meta/lib/oe/maketype.py +++ b/meta/lib/oe/maketype.py @@ -7,7 +7,12 @@ the arguments of the type's factory for details. import inspect import oe.types as types -import collections +try: + # Python 3.7+ + from collections.abc import Callable +except ImportError: + # Python < 3.7 + from collections import Callable available_types = {} @@ -96,7 +101,7 @@ for name in dir(types): continue obj = getattr(types, name) - if not isinstance(obj, collections.Callable): + if not isinstance(obj, Callable): continue register(name, obj) |