mirror of
https://git.yoctoproject.org/poky
synced 2026-04-20 00:32:13 +02:00
scripts: python3: use new metaclass syntax
Used metaclass=<metaclass> syntax instead old __metaclass__ = <metaclass> as only new one is supported in python 3. (From meta-yocto rev: 70ba79981d904b4b67440c0b5755b5449cddb025) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
5483fa294f
commit
ecc91840bf
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user