summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oe/maketype.py9
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.
7 7
8import inspect 8import inspect
9import oe.types as types 9import oe.types as types
10import collections 10try:
11 # Python 3.7+
12 from collections.abc import Callable
13except ImportError:
14 # Python < 3.7
15 from collections import Callable
11 16
12available_types = {} 17available_types = {}
13 18
@@ -96,7 +101,7 @@ for name in dir(types):
96 continue 101 continue
97 102
98 obj = getattr(types, name) 103 obj = getattr(types, name)
99 if not isinstance(obj, collections.Callable): 104 if not isinstance(obj, Callable):
100 continue 105 continue
101 106
102 register(name, obj) 107 register(name, obj)