From nobody Mon Feb 9 22:39:02 2026 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+61989+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+61989+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1593704379; cv=none; d=zohomail.com; s=zohoarc; b=dbEb/I09N87sqxdUUKuzNYBwrN8dSE1qzTpw1UKtFgkPP39H5tGu4PBtJ1O2YPDSk+4t2akqsJ+/L2Rk+tNt1gy3MxkZ89qM/IBN7NUJES7EBBFkYr7Fcmfe5tnjHPF1xk52nmuIASyfFGfRcc9RzjPLnQSurK8M9vIZdbua+aE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593704379; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=Wy/YMYouzarKlmDkLPiDJ33VdfynBVQvx5p4UsEJLTk=; b=XhfM3keaUAU0PSUkLORNJQLozEir99YYaz9fTPWZiCMWWXQPXF+wQFz/GfKKKcmMIZsECfJ8xcWOUpu52uLXNrd+nT2o+UisY8dk4fX9M1Fv9otPgyflfzid7U5H3LYOWO2HHIvbxWJDuQwjK8RWxjpB8cdRJQEYnGYCGlQnRHA= 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+61989+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1593704379904883.5171445536035; Thu, 2 Jul 2020 08:39:39 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 65C0YY1788612xPyUx3ob9A7; Thu, 02 Jul 2020 08:39:39 -0700 X-Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by mx.groups.io with SMTP id smtpd.web11.9651.1593704378781522468 for ; Thu, 02 Jul 2020 08:39:39 -0700 X-Received: by mail-wr1-f41.google.com with SMTP id z15so17791653wrl.8 for ; Thu, 02 Jul 2020 08:39:38 -0700 (PDT) X-Gm-Message-State: OflPNRkG0WcN7Q0JLOhvZcbTx1787277AA= X-Google-Smtp-Source: ABdhPJw0RsBQlpMWwBE45ohRx60y9V5x5uW3g0de2TLcoL1efynXPXj2IpDB32jiNnIIjUKeK507cQ== X-Received: by 2002:a5d:4051:: with SMTP id w17mr30766799wrp.183.1593704377080; Thu, 02 Jul 2020 08:39:37 -0700 (PDT) X-Received: from vanye.hemma.eciton.net (cpc92302-cmbg19-2-0-cust304.5-4.cable.virginm.net. [82.1.209.49]) by smtp.gmail.com with ESMTPSA id e5sm11540205wrs.33.2020.07.02.08.39.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2020 08:39:36 -0700 (PDT) From: "Leif Lindholm" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao Subject: [edk2-devel] [PATCH 2/2] BaseTools: explicitly import email.header PatchCheck.py Date: Thu, 2 Jul 2020 16:39:34 +0100 Message-Id: <20200702153934.25262-3-leif@nuviainc.com> In-Reply-To: <20200702153934.25262-1-leif@nuviainc.com> References: <20200702153934.25262-1-leif@nuviainc.com> MIME-Version: 1.0 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,leif@nuviainc.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1593704379; bh=n+5cfNTLLiCKduCRT7ejeYBB4AMnY5o73TWlUGEB7Iw=; h=Cc:Date:From:Reply-To:Subject:To; b=tQn2Fg8TzGTnlvT+sgK3SJxTUcRbGTav4TLSZDa9uMpP42z5I9/RfdUMTRc7kl9YhQ9 qKG65wET6Ut+72K6HwTLSyefzbzHvep2HSAMGy8DgueDrX25v+LyGe+iWyLTcI++ZTl2X HQaCce74nhYJ9eobQEj046qzmBPxxiN4RJU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" On Debian 10 (Buster), when running PatchCheck.py with python2, a backtrace is printed, starting from: File "../edk2/BaseTools/Scripts/PatchCheck.py", line 595, in find_patch_pieces parts =3D email.header.decode_header(pmail.get('subject')) AttributeError: 'module' object has no attribute 'header' When using python3, this backtrace does not appear. Explicitly importing email.header resolves this for python2 and does not appear to cause any issues with python3. Cc: Bob Feng Cc: Liming Gao Signed-off-by: Leif Lindholm Reviewed-by: Bob Feng --- BaseTools/Scripts/PatchCheck.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck= .py index 527761986d4c..52244b0bc4d8 100755 --- a/BaseTools/Scripts/PatchCheck.py +++ b/BaseTools/Scripts/PatchCheck.py @@ -20,6 +20,8 @@ import re import subprocess import sys =20 +import email.header + class Verbose: SILENT, ONELINE, NORMAL =3D range(3) level =3D NORMAL --=20 2.20.1 -=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 (#61989): https://edk2.groups.io/g/devel/message/61989 Mute This Topic: https://groups.io/mt/75260901/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-