\r
# convert source files and binary files to build targets\r
self.ResultFileList = [str(T.Target) for T in self._AutoGenObject.CodaTargetList]\r
- if len(self.ResultFileList) == 0 and len(self._AutoGenObject.SourceFileList) <> 0:\r
+ if len(self.ResultFileList) == 0 and len(self._AutoGenObject.SourceFileList) != 0:\r
EdkLogger.error("build", AUTOGEN_ERROR, "Nothing to build",\r
ExtraData="[%s]" % str(self._AutoGenObject))\r
\r
Src = self.ReplaceMacro(Src)\r
Dst = self.ReplaceMacro(Dst)\r
if Dst not in self.ResultFileList:\r
- self.ResultFileList.append('%s' % Dst)\r
+ self.ResultFileList.append(Dst)\r
if '%s :' %(Dst) not in self.BuildTargetList:\r
self.BuildTargetList.append("%s :" %(Dst))\r
self.BuildTargetList.append('\t' + self._CP_TEMPLATE_[self._FileType] %{'Src': Src, 'Dst': Dst})\r
if DepsFileString == '':\r
continue\r
OutputFile = self.ReplaceMacro(OutputFile)\r
- self.ResultFileList.append('%s' % OutputFile)\r
+ self.ResultFileList.append(OutputFile)\r
DepsFileString = self.ReplaceMacro(DepsFileString)\r
self.BuildTargetList.append('%s : %s' % (OutputFile, DepsFileString))\r
CmdString = ' '.join(FfsCmdList).strip()\r
else:\r
try:\r
Fd = open(F.Path, 'r')\r
- except BaseException, X:\r
+ except BaseException as X:\r
EdkLogger.error("build", FILE_OPEN_FAILURE, ExtraData=F.Path + "\n\t" + str(X))\r
\r
FileContent = Fd.read()\r