From ecc91840bfe37f2ff549cce931b98a4d7e37f193 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Thu, 2 Jun 2016 13:12:53 +0300 Subject: 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 --- scripts/lib/bsp/engine.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/lib/bsp/engine.py b/scripts/lib/bsp/engine.py index f75454d4b4..5b4948635e 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) -- cgit 1.2.3-korg