summaryrefslogtreecommitdiff
path: root/poky/bitbake/lib/bb/namedtuple_with_abc.py
diff options
context:
space:
mode:
authorJason M. Bills <jason.m.bills@linux.intel.com>2020-12-08 00:38:17 +0300
committerJason M. Bills <jason.m.bills@linux.intel.com>2020-12-08 00:38:17 +0300
commit8d6ae7f2a817751fad151168fa10ce28ee0869d8 (patch)
tree281032f7ec07c41589aa094bd165cc2a98f2d3a7 /poky/bitbake/lib/bb/namedtuple_with_abc.py
parentc16fb8893b19075db4bcf3b5bf33c1db8c3ca2bd (diff)
parent5da3c2284560a7e08ffafd03c5b5ba44a3242228 (diff)
downloadopenbmc-8d6ae7f2a817751fad151168fa10ce28ee0869d8.tar.xz
Merge tag '0.26' of ssh://git-amr-1.devtools.intel.com:29418/openbmc-openbmc into update
Diffstat (limited to 'poky/bitbake/lib/bb/namedtuple_with_abc.py')
-rw-r--r--poky/bitbake/lib/bb/namedtuple_with_abc.py14
1 files changed, 3 insertions, 11 deletions
diff --git a/poky/bitbake/lib/bb/namedtuple_with_abc.py b/poky/bitbake/lib/bb/namedtuple_with_abc.py
index 646aed6ff..e46dbf084 100644
--- a/poky/bitbake/lib/bb/namedtuple_with_abc.py
+++ b/poky/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