BaseTools: Remove equality operator with None
replace "== None" with "is None" and "!= None" with "is not None" Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
committed by
Yonghong Zhu
parent
05a32984ab
commit
4231a8193e
@ -44,11 +44,11 @@ def GenerateHelpText(Text, Lang):
|
||||
class CommonClass(object):
|
||||
def __init__(self, Usage = None, FeatureFlag = '', SupArchList = None, HelpText = ''):
|
||||
self.Usage = Usage
|
||||
if self.Usage == None:
|
||||
if self.Usage is None:
|
||||
self.Usage = []
|
||||
self.FeatureFlag = FeatureFlag
|
||||
self.SupArchList = SupArchList
|
||||
if self.SupArchList == None:
|
||||
if self.SupArchList is None:
|
||||
self.SupArchList = []
|
||||
self.HelpText = HelpText
|
||||
self.HelpTextList = []
|
||||
@ -375,13 +375,13 @@ class PcdClass(CommonClass):
|
||||
self.PcdCName = ''
|
||||
self.Value = ''
|
||||
self.Offset = ''
|
||||
if self.ValidUsage == None:
|
||||
if self.ValidUsage is None:
|
||||
self.ValidUsage = []
|
||||
self.SkuInfoList = SkuInfoList
|
||||
if self.SkuInfoList == None:
|
||||
if self.SkuInfoList is None:
|
||||
self.SkuInfoList = {}
|
||||
self.SupModuleList = SupModuleList
|
||||
if self.SupModuleList == None:
|
||||
if self.SupModuleList is None:
|
||||
self.SupModuleList = []
|
||||
CommonClass.__init__(self)
|
||||
self.PcdErrors = []
|
||||
|
Reference in New Issue
Block a user