Source = SourceList[Index]\r
Index = Index + 1\r
\r
- if File.IsBinary and File == Source and Inf.Binaries != None and File in Inf.Binaries:\r
+ if File.IsBinary and File == Source and Inf.Binaries is not None and File in Inf.Binaries:\r
# Skip all files that are not binary libraries\r
if not Inf.LibraryClass:\r
continue \r
if not os.path.exists(Output):\r
return True\r
# always update "Output" if no "Input" given\r
- if Input == None or len(Input) == 0:\r
+ if Input is None or len(Input) == 0:\r
return True\r
\r
# if fdf file is changed after the 'Output" is generated, update the 'Output'\r
Cmd += ["-s", Type]\r
if CompressionType not in [None, '']:\r
Cmd += ["-c", CompressionType]\r
- if Guid != None:\r
+ if Guid is not None:\r
Cmd += ["-g", Guid]\r
- if DummyFile != None:\r
+ if DummyFile is not None:\r
Cmd += ["--dummy", DummyFile]\r
if GuidHdrLen not in [None, '']:\r
Cmd += ["-l", GuidHdrLen]\r
#Add each guided attribute\r
for Attr in GuidAttr:\r
Cmd += ["-r", Attr]\r
- if InputAlign != None:\r
+ if InputAlign is not None:\r
#Section Align is only for dummy section without section type\r
for SecAlign in InputAlign:\r
Cmd += ["--sectionalign", SecAlign]\r
\r
@staticmethod\r
def GetAlignment (AlignString):\r
- if AlignString == None:\r
+ if AlignString is None:\r
return 0\r
if AlignString in ("1K", "2K", "4K", "8K", "16K", "32K", "64K", "128K", "256K", "512K"):\r
return int (AlignString.rstrip('K')) * 1024\r
return\r
GenFdsGlobalVariable.DebugLogger(EdkLogger.DEBUG_5, "%s needs update because of newer %s" % (Output, InputList))\r
\r
- if ClassCode != None:\r
+ if ClassCode is not None:\r
Cmd += ["-l", ClassCode]\r
- if Revision != None:\r
+ if Revision is not None:\r
Cmd += ["-r", Revision]\r
- if DeviceId != None:\r
+ if DeviceId is not None:\r
Cmd += ["-i", DeviceId]\r
- if VendorId != None:\r
+ if VendorId is not None:\r
Cmd += ["-f", VendorId]\r
\r
Cmd += ["-o", Output]\r
EdkLogger.error("GenFds", COMMAND_FAILURE, ExtraData="%s: %s" % (str(X), cmd[0]))\r
(out, error) = PopenObject.communicate()\r
\r
- while PopenObject.returncode == None :\r
+ while PopenObject.returncode is None :\r
PopenObject.wait()\r
if returnValue != [] and returnValue[0] != 0:\r
#get command return value\r
# @param MacroDict Dictionary that contains macro value pair\r
#\r
def MacroExtend (Str, MacroDict={}, Arch='COMMON'):\r
- if Str == None :\r
+ if Str is None :\r
return None\r
\r
Dict = {'$(WORKSPACE)' : GenFdsGlobalVariable.WorkSpaceDir,\r
\r
Dict['$(OUTPUT_DIRECTORY)'] = OutputDir\r
\r
- if MacroDict != None and len (MacroDict) != 0:\r
+ if MacroDict is not None and len (MacroDict) != 0:\r
Dict.update(MacroDict)\r
\r
for key in Dict.keys():\r
# @param PcdPattern pattern that labels a PCD.\r
#\r
def GetPcdValue (PcdPattern):\r
- if PcdPattern == None :\r
+ if PcdPattern is None :\r
return None\r
PcdPair = PcdPattern.lstrip('PCD(').rstrip(')').strip().split('.')\r
TokenSpace = PcdPair[0]\r