diff options
author | Pierre Gondois <pierre.gondois@arm.com> | 2020-07-01 22:06:04 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-07-02 10:09:17 +0000 |
commit | 0622a7b1b203ad4ab1675533e958792fc1afc12b (patch) | |
tree | 02be8ad9636d883aa8568d0ac49be2a5c1fbad31 /BaseTools/Source/Python/AutoGen/BuildEngine.py | |
parent | 0a4aa20e8d446c2f5dd54f3a0a7ec4d52f0ebdb6 (diff) | |
download | edk2-0622a7b1b203ad4ab1675533e958792fc1afc12b.tar.gz edk2-0622a7b1b203ad4ab1675533e958792fc1afc12b.tar.bz2 edk2-0622a7b1b203ad4ab1675533e958792fc1afc12b.zip |
BaseTools: Fix string concatenation
Using Python 3.7.2 on win32, when printing a FileBuildRule
instance, the following error occurs:
File "edk2\BaseTools\Source\Python\AutoGen\BuildEngine.py",
line 177, in __str__
DestString = ", ".join(self.DestFileList)
TypeError: sequence item 0: expected str instance, PathClass found
This patch converts each PathClass element of the list to a string
instance before concatenating them.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/BuildEngine.py')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/BuildEngine.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/AutoGen/BuildEngine.py b/BaseTools/Source/Python/AutoGen/BuildEngine.py index d602414ca4..722fead75a 100644 --- a/BaseTools/Source/Python/AutoGen/BuildEngine.py +++ b/BaseTools/Source/Python/AutoGen/BuildEngine.py @@ -172,7 +172,7 @@ class FileBuildRule: def __str__(self):
SourceString = ""
SourceString += " %s %s %s" % (self.SourceFileType, " ".join(self.SourceFileExtList), self.ExtraSourceFileList)
- DestString = ", ".join(self.DestFileList)
+ DestString = ", ".join([str(i) for i in self.DestFileList])
CommandString = "\n\t".join(self.CommandList)
return "%s : %s\n\t%s" % (DestString, SourceString, CommandString)
|