From nobody Tue Nov 26 02:21:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+61488+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+61488+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1592490446; cv=none; d=zohomail.com; s=zohoarc; b=QIJWLGoqHtnFuk3K+9ZXJES74BYesRRA25oV8YnOmsiMzoO0eMLG4QGBYdC8j+1YbUSgP/QPupO6ty3ReszSLWQoDBDbGQilr+rXMYCjvHYGkiIwNPkYJBGnLekQb5iYWNGJR0xvR0nDHeBgCBSf/TyiTbfXBxFS0YnPtq5DEjM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592490446; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=YrRppdVRzYMKEW/8nTCmmy/aVdFhWCWcwGrmuddnSjs=; b=WxQPXp3yMva5T+C4C/BklE1bZaviWgUfzWTBFb2Jw2EuWKKSwUvXb3TiUroycohppp7ELha99kveuFqhr0EpGPB2don14O3shwqwK+rjjv/5lhJIi+QjbhfdbDvsJzl49aJXCEGbgH0Me9szO1OFJfR6eo4Ll60UCUHyrOgNMZY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+61488+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1592490446365566.8950004316348; Thu, 18 Jun 2020 07:27:26 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 2SuCYY1788612xpXMHHSWauo; Thu, 18 Jun 2020 07:27:25 -0700 X-Received: from cam-smtp0.cambridge.arm.com (cam-smtp0.cambridge.arm.com [217.140.106.49]) by mx.groups.io with SMTP id smtpd.web10.8741.1592490442764003416 for ; Thu, 18 Jun 2020 07:27:23 -0700 X-Received: from E119881.Arm.com (E119881.Arm.com [10.1.197.28]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id 05IERJ6a020245; Thu, 18 Jun 2020 15:27:20 +0100 From: "PierreGondois" To: devel@edk2.groups.io Cc: Pierre Gondois , sami.mujawar@arm.com, tomas.pilar@arm.com, bob.c.feng@intel.com, liming.gao@intel.com, nd@arm.com Subject: [edk2-devel] [PATCH v2 4/4] BaseTools: Fix string concatenation Date: Thu, 18 Jun 2020 15:27:13 +0100 Message-Id: <20200618142713.146412-5-pierre.gondois@arm.com> In-Reply-To: <20200618142713.146412-1-pierre.gondois@arm.com> References: <20200618142713.146412-1-pierre.gondois@arm.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: 4oRin2AIcOYUur6Wb2YEFAVWx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1592490445; bh=HMq59XxvoPEjSFXQu8RuL44Jv0vkYQZ9qnszO9cBJmQ=; h=Cc:Date:From:Reply-To:Subject:To; b=v+3m4/JVdGvtCbuhkfyQCREyE+j1wWDX+2S7VJ4832lBLinlzVc+Tc/TWAuM+DONDJL SQES2KRdBw8tl6qIQMyWE0ToAjid1HHz1H3X0pdOp+XeiCmMXAVXkWgKXvp5g+jsFJSAd 0icQsFsgzsgo8lLDJQpk1qSd78g9ppx9TNI= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois 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 =3D ", ".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 --- The changes can be seen at https://github.com/PierreARM/edk2/commits/pg/803= _Compile_AML_bytecode_array_into_OBJ_file_v2 Notes: Notes: v2: - No v1 for this patch. Fix a __str__ method. [Pierre] BaseTools/Source/Python/AutoGen/BuildEngine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/AutoGen/BuildEngine.py b/BaseTools/Sou= rce/Python/AutoGen/BuildEngine.py index d602414ca41f37155c9c6d00eec54ea3918840c3..722fead75af6d60aa82365d9998= 37cd5ac3299af 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 =3D "" SourceString +=3D " %s %s %s" % (self.SourceFileType, " ".join(sel= f.SourceFileExtList), self.ExtraSourceFileList) - DestString =3D ", ".join(self.DestFileList) + DestString =3D ", ".join([str(i) for i in self.DestFileList]) CommandString =3D "\n\t".join(self.CommandList) return "%s : %s\n\t%s" % (DestString, SourceString, CommandString) =20 --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#61488): https://edk2.groups.io/g/devel/message/61488 Mute This Topic: https://groups.io/mt/74959529/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-