mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 13:29:49 +00: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 subprocess
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
class Line():
|
class Line(metaclass=ABCMeta):
|
||||||
"""
|
"""
|
||||||
Generic (abstract) container representing a line that will appear
|
Generic (abstract) container representing a line that will appear
|
||||||
in the BSP-generating program.
|
in the BSP-generating program.
|
||||||
"""
|
"""
|
||||||
__metaclass__ = ABCMeta
|
|
||||||
|
|
||||||
def __init__(self, line):
|
def __init__(self, line):
|
||||||
self.line = line
|
self.line = line
|
||||||
@@ -319,11 +318,10 @@ class BooleanInputLine(InputLine):
|
|||||||
return line
|
return line
|
||||||
|
|
||||||
|
|
||||||
class ListInputLine(InputLine):
|
class ListInputLine(InputLine, metaclass=ABCMeta):
|
||||||
"""
|
"""
|
||||||
Base class for List-based Input lines. e.g. Choicelist, Checklist.
|
Base class for List-based Input lines. e.g. Choicelist, Checklist.
|
||||||
"""
|
"""
|
||||||
__metaclass__ = ABCMeta
|
|
||||||
|
|
||||||
def __init__(self, props, tag, lineno):
|
def __init__(self, props, tag, lineno):
|
||||||
InputLine.__init__(self, props, tag, lineno)
|
InputLine.__init__(self, props, tag, lineno)
|
||||||
|
|||||||
Reference in New Issue
Block a user