misc: Replace basestring with six.string_types
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Fri, 28 Feb 2020 14:58:17 +0000 (14:58 +0000)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Tue, 10 Mar 2020 09:35:56 +0000 (09:35 +0000)
Change-Id: I914adb545fe82efed386085d2f191ec54efccbf3
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26246
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/SConscript

index 03fae53c33ccb8333ed684205f995ca73e2fc657..0797dba0dca138a34254a9d209f8d29d9620bde8 100644 (file)
@@ -156,14 +156,14 @@ class SourceFile(object):
     def __init__(self, source, tags=None, add_tags=None, append=None):
         if tags is None:
             tags='gem5 lib'
-        if isinstance(tags, basestring):
+        if isinstance(tags, six.string_types):
             tags = set([tags])
         if not isinstance(tags, set):
             tags = set(tags)
         self.tags = tags
 
         if add_tags:
-            if isinstance(add_tags, basestring):
+            if isinstance(add_tags, six.string_types):
                 add_tags = set([add_tags])
             if not isinstance(add_tags, set):
                 add_tags = set(add_tags)