From 4231a8193ec0d52df7e0a101d96c51b1a2b7a996 Mon Sep 17 00:00:00 2001 From: "Carsey, Jaben" Date: Tue, 27 Mar 2018 04:25:43 +0800 Subject: BaseTools: Remove equality operator with None replace "== None" with "is None" and "!= None" with "is not None" Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey Reviewed-by: Yonghong Zhu --- BaseTools/Source/Python/UPT/Object/Parser/InfHeaderObject.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'BaseTools/Source/Python/UPT/Object/Parser/InfHeaderObject.py') diff --git a/BaseTools/Source/Python/UPT/Object/Parser/InfHeaderObject.py b/BaseTools/Source/Python/UPT/Object/Parser/InfHeaderObject.py index 45fba31aaa..dce75063df 100644 --- a/BaseTools/Source/Python/UPT/Object/Parser/InfHeaderObject.py +++ b/BaseTools/Source/Python/UPT/Object/Parser/InfHeaderObject.py @@ -43,7 +43,7 @@ class InfHeaderObject(): # @param FileName: File Name # def SetFileName(self, FileName): - if not (FileName == '' or FileName == None): + if not (FileName == '' or FileName is None): self.FileName = FileName return True else: @@ -59,7 +59,7 @@ class InfHeaderObject(): # @param Abstract: Abstract # def SetAbstract(self, Abstract): - if not (Abstract == '' or Abstract == None): + if not (Abstract == '' or Abstract is None): self.Abstract = Abstract return True else: @@ -75,7 +75,7 @@ class InfHeaderObject(): # @param Description: Description content # def SetDescription(self, Description): - if not (Description == '' or Description == None): + if not (Description == '' or Description is None): self.Description = Description return True else: @@ -91,7 +91,7 @@ class InfHeaderObject(): # @param Copyright: Copyright content # def SetCopyright(self, Copyright): - if not (Copyright == '' or Copyright == None): + if not (Copyright == '' or Copyright is None): self.Copyright = Copyright return True else: @@ -107,7 +107,7 @@ class InfHeaderObject(): # @param License: License content # def SetLicense(self, License): - if not (License == '' or License == None): + if not (License == '' or License is None): self.License = License return True else: -- cgit v1.2.3