summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/AutoGen
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Source/Python/AutoGen')
-rw-r--r--BaseTools/Source/Python/AutoGen/BuildEngine.py2
-rw-r--r--BaseTools/Source/Python/AutoGen/GenDepex.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/AutoGen/BuildEngine.py b/BaseTools/Source/Python/AutoGen/BuildEngine.py
index cab4c993dc..e205589c6b 100644
--- a/BaseTools/Source/Python/AutoGen/BuildEngine.py
+++ b/BaseTools/Source/Python/AutoGen/BuildEngine.py
@@ -68,7 +68,7 @@ class TargetDescBlock(object):
return hash(self.Target.Path)
def __eq__(self, Other):
- if type(Other) == type(self):
+ if isinstance(Other, type(self)):
return Other.Target.Path == self.Target.Path
else:
return str(Other) == self.Target.Path
diff --git a/BaseTools/Source/Python/AutoGen/GenDepex.py b/BaseTools/Source/Python/AutoGen/GenDepex.py
index b69788c37e..e89191a72b 100644
--- a/BaseTools/Source/Python/AutoGen/GenDepex.py
+++ b/BaseTools/Source/Python/AutoGen/GenDepex.py
@@ -140,7 +140,7 @@ class DependencyExpression:
def __init__(self, Expression, ModuleType, Optimize=False):
self.ModuleType = ModuleType
self.Phase = gType2Phase[ModuleType]
- if type(Expression) == type([]):
+ if isinstance(Expression, type([])):
self.ExpressionString = " ".join(Expression)
self.TokenList = Expression
else: