summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Source/Python/Ecc/CodeFragmentCollector.py')
-rw-r--r--BaseTools/Source/Python/Ecc/CodeFragmentCollector.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py b/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py
index 171600feeb..fbe0c41b38 100644
--- a/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py
+++ b/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py
@@ -301,7 +301,7 @@ class CodeFragmentCollector:
InCharLiteral = not InCharLiteral
# meet new line, then no longer in a comment for // and '#'
if self.__CurrentChar() == T_CHAR_LF:
- if HashComment and PPDirectiveObj != None:
+ if HashComment and PPDirectiveObj is not None:
if PPDirectiveObj.Content.rstrip(T_CHAR_CR).endswith(T_CHAR_BACKSLASH):
PPDirectiveObj.Content += T_CHAR_LF
PPExtend = True
@@ -423,7 +423,7 @@ class CodeFragmentCollector:
InCharLiteral = not InCharLiteral
# meet new line, then no longer in a comment for // and '#'
if self.__CurrentChar() == T_CHAR_LF:
- if HashComment and PPDirectiveObj != None:
+ if HashComment and PPDirectiveObj is not None:
if PPDirectiveObj.Content.rstrip(T_CHAR_CR).endswith(T_CHAR_BACKSLASH):
PPDirectiveObj.Content += T_CHAR_LF
PPExtend = True