misc: Replace __metaclass__ with six.add_metaclass

Change-Id: I45f73b71266c1edf9c4ec521d58db779b16bd591
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26245
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Giacomo Travaglini
2020-02-28 14:56:16 +00:00
parent 4e7fe439d7
commit 3c1f87c81c
5 changed files with 12 additions and 7 deletions

View File

@@ -45,6 +45,7 @@ import functools
import imp
import os
import re
import six
import sys
import zlib
@@ -142,12 +143,12 @@ class SourceMeta(type):
super(SourceMeta, cls).__init__(name, bases, dict)
cls.all = SourceList()
@six.add_metaclass(SourceMeta)
class SourceFile(object):
'''Base object that encapsulates the notion of a source file.
This includes, the source node, target node, various manipulations
of those. A source file also specifies a set of tags which
describing arbitrary properties of the source file.'''
__metaclass__ = SourceMeta
static_objs = {}
shared_objs = {}
@@ -413,9 +414,9 @@ class ExecutableMeta(type):
cls.all = []
@six.add_metaclass(ExecutableMeta)
class Executable(object):
'''Base class for creating an executable from sources.'''
__metaclass__ = ExecutableMeta
abstract = True