From: Ed Bartosh Date: Thu, 2 Jun 2016 10:12:53 +0000 (+0300) Subject: scripts: python3: use new metaclass syntax X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ecc91840bfe37f2ff549cce931b98a4d7e37f193;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git scripts: python3: use new metaclass syntax Used metaclass= syntax instead old __metaclass__ = as only new one is supported in python 3. (From meta-yocto rev: 70ba79981d904b4b67440c0b5755b5449cddb025) Signed-off-by: Ed Bartosh Signed-off-by: Richard Purdie --- diff --git a/scripts/lib/bsp/engine.py b/scripts/lib/bsp/engine.py index f75454d4b40..5b4948635eb 100644 --- a/scripts/lib/bsp/engine.py +++ b/scripts/lib/bsp/engine.py @@ -40,12 +40,11 @@ import json import subprocess import shutil -class Line(): +class Line(metaclass=ABCMeta): """ Generic (abstract) container representing a line that will appear in the BSP-generating program. """ - __metaclass__ = ABCMeta def __init__(self, line): self.line = line @@ -319,11 +318,10 @@ class BooleanInputLine(InputLine): return line -class ListInputLine(InputLine): +class ListInputLine(InputLine, metaclass=ABCMeta): """ Base class for List-based Input lines. e.g. Choicelist, Checklist. """ - __metaclass__ = ABCMeta def __init__(self, props, tag, lineno): InputLine.__init__(self, props, tag, lineno)