diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-06-02 13:12:53 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-03 13:13:31 +0100 |
commit | ecc91840bfe37f2ff549cce931b98a4d7e37f193 (patch) | |
tree | c580565132467423b5897701c6f2e98b81e2c690 /scripts/lib/bsp | |
parent | 5483fa294f164cb613f95e9a254353846962120a (diff) | |
download | poky-ecc91840bfe37f2ff549cce931b98a4d7e37f193.tar.gz |
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>
Diffstat (limited to 'scripts/lib/bsp')
-rw-r--r-- | scripts/lib/bsp/engine.py | 6 |
1 files changed, 2 insertions, 4 deletions
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 | |||
40 | import subprocess | 40 | import subprocess |
41 | import shutil | 41 | import shutil |
42 | 42 | ||
43 | class Line(): | 43 | class Line(metaclass=ABCMeta): |
44 | """ | 44 | """ |
45 | Generic (abstract) container representing a line that will appear | 45 | Generic (abstract) container representing a line that will appear |
46 | in the BSP-generating program. | 46 | in the BSP-generating program. |
47 | """ | 47 | """ |
48 | __metaclass__ = ABCMeta | ||
49 | 48 | ||
50 | def __init__(self, line): | 49 | def __init__(self, line): |
51 | self.line = line | 50 | self.line = line |
@@ -319,11 +318,10 @@ class BooleanInputLine(InputLine): | |||
319 | return line | 318 | return line |
320 | 319 | ||
321 | 320 | ||
322 | class ListInputLine(InputLine): | 321 | class ListInputLine(InputLine, metaclass=ABCMeta): |
323 | """ | 322 | """ |
324 | Base class for List-based Input lines. e.g. Choicelist, Checklist. | 323 | Base class for List-based Input lines. e.g. Choicelist, Checklist. |
325 | """ | 324 | """ |
326 | __metaclass__ = ABCMeta | ||
327 | 325 | ||
328 | def __init__(self, props, tag, lineno): | 326 | def __init__(self, props, tag, lineno): |
329 | InputLine.__init__(self, props, tag, lineno) | 327 | InputLine.__init__(self, props, tag, lineno) |