]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
scripts: python3: use new metaclass syntax
authorEd Bartosh <ed.bartosh@linux.intel.com>
Thu, 2 Jun 2016 10:12:53 +0000 (13:12 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 2 Jun 2016 10:47:43 +0000 (11:47 +0100)
Used metaclass=<metaclass> syntax instead old
__metaclass__ = <metaclass> as only new one is supported
in python 3.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/test-remote-image

index 7a00db92c09f72a1814cee2bbdbb737fbf1bb45b..698948b83455699bc35bbaf1f2698dd7ee5e154b 100755 (executable)
@@ -92,13 +92,11 @@ def get_args_parser():
     parser.add_argument('--skip-download', required=False, action="store_true", dest="skip_download", default=False, help='Skip downloading the images completely. This needs the correct files to be present in the directory specified by the target profile.')
     return parser
 
-class BaseTargetProfile(object):
+class BaseTargetProfile(object, metaclass=ABCMeta):
     """
     This class defines the meta profile for a specific target (MACHINE type + image type).
     """
 
-    __metaclass__ = ABCMeta
-
     def __init__(self, image_type):
         self.image_type = image_type
 
@@ -191,13 +189,11 @@ class AutoTargetProfile(BaseTargetProfile):
         return controller.get_extra_files()
 
 
-class BaseRepoProfile(object):
+class BaseRepoProfile(object, metaclass=ABCMeta):
     """
     This class defines the meta profile for an images repository.
     """
 
-    __metaclass__ = ABCMeta
-
     def __init__(self, repolink, localdir):
         self.localdir = localdir
         self.repolink = repolink