summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/namedtuple_with_abc.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/namedtuple_with_abc.py')
-rw-r--r--bitbake/lib/bb/namedtuple_with_abc.py14
1 files changed, 3 insertions, 11 deletions
diff --git a/bitbake/lib/bb/namedtuple_with_abc.py b/bitbake/lib/bb/namedtuple_with_abc.py
index 646aed6ffd..e46dbf0849 100644
--- a/bitbake/lib/bb/namedtuple_with_abc.py
+++ b/bitbake/lib/bb/namedtuple_with_abc.py
@@ -61,17 +61,9 @@ class _NamedTupleABCMeta(ABCMeta):
return ABCMeta.__new__(mcls, name, bases, namespace)
-exec(
- # Python 2.x metaclass declaration syntax
- """class _NamedTupleABC(object):
- '''The abstract base class + mix-in for named tuples.'''
- __metaclass__ = _NamedTupleABCMeta
- _fields = abstractproperty()""" if version_info[0] < 3 else
- # Python 3.x metaclass declaration syntax
- """class _NamedTupleABC(metaclass=_NamedTupleABCMeta):
- '''The abstract base class + mix-in for named tuples.'''
- _fields = abstractproperty()"""
-)
+class _NamedTupleABC(metaclass=_NamedTupleABCMeta):
+ '''The abstract base class + mix-in for named tuples.'''
+ _fields = abstractproperty()
_namedtuple.abc = _NamedTupleABC