[gnome-continuous-yocto/gnomeostree-3.28-rocko: 713/8267] scripts: python3: use new metaclass syntax



commit ecc91840bfe37f2ff549cce931b98a4d7e37f193
Author: Ed Bartosh <ed bartosh linux intel com>
Date:   Thu Jun 2 13:12:53 2016 +0300

    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>

 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 f75454d..5b49486 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)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]