From nobody Mon Feb 9 12:26:36 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+51790+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+51790+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1575562392; cv=none; d=zohomail.com; s=zohoarc; b=U32HE5f3NhnBI6qOcR0LeH6wU8YG58JNMF9pQBD1xYkIOfq8YP4gMykuSBzywF4CWGxAQv0UPOEeEPnbyC8mOni6yX6EPnsWs7N4x+mfebopkK1S6G4vu3cA2JMSByC++ZMFXtK0ueujPbyY23TN7ZHLlE5c2sIrIJibwLaTwME= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575562392; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=oOaouMLsM8dWiGQ9UPPJp3X9EJIPqRe4nsJpgNPbSs4=; b=ePfGPkbV3KjaEs4mH35jm7pz6NeuxuFn3XBmeQlFJsmLfcqa0LeT6BJ7gaheK8O18Cq2FJcrJRCJVw0NexxRk0jBWj0whCl4OhGX/MZUo/0uEJacAoH6cmAy+CAkVWrGXc9L7MOl0phaoqYdMHt1cfkyYo+CwvwZSMOpB31zlOA= 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+51790+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1575562392670831.4715454932793; Thu, 5 Dec 2019 08:13:12 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id aaaaYY1788612xaaaaaaaaaa; Thu, 05 Dec 2019 08:13:12 -0800 X-Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.61]) by mx.groups.io with SMTP id smtpd.web11.11720.1575562378138535946 for ; Thu, 05 Dec 2019 08:12:58 -0800 X-Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-438-DML6iHKWOrWahEQnvCNs_A-1; Thu, 05 Dec 2019 11:12:53 -0500 X-Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CEFCA18B5F8A; Thu, 5 Dec 2019 16:12:52 +0000 (UTC) X-Received: from x1w.redhat.com (ovpn-205-76.brq.redhat.com [10.40.205.76]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5655F10013D9; Thu, 5 Dec 2019 16:12:51 +0000 (UTC) From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= To: devel@edk2.groups.io Cc: Philippe Mathieu-Daude , Bob Feng , Liming Gao Subject: [edk2-devel] [PATCH 5/6] BaseTools/PatchCheck: Add printw() function to print warnings Date: Thu, 5 Dec 2019 17:12:33 +0100 Message-Id: <20191205161234.25071-6-philmd@redhat.com> In-Reply-To: <20191205161234.25071-1-philmd@redhat.com> References: <20191205161234.25071-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: DML6iHKWOrWahEQnvCNs_A-1 X-Mimecast-Spam-Score: 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,philmd@redhat.com X-Gm-Message-State: aaaaaaaaaaaaaaaaaaaaaaaax1787277AA= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1575562392; bh=AwAkxnMPc93S/XCymHSyVNuZvf54RPVOz8KWacLlsbs=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=B/j9LBSFOr1TrYvrWUC9XMtnTPJgWWM9RhYpnb3rukHhjcFzLel7yWDnf575lRTtUJb 8fvbnj1pSuQx+c5k/jxUrKJPK50ai2zPcAwLdG+beGd/ZdLkOaBu6djdd4TiDpY89fLPX Z6jGIbsy1zD5Dc0xxn5+16dVkvn1WRsCrhI= X-ZohoMail-DKIM: pass (identity @groups.io) Introduce printw() to print warnings. For now there are no logical change, we only call print(). Cc: Bob Feng Cc: Liming Gao Signed-off-by: Philippe Mathieu-Daude --- BaseTools/Scripts/PatchCheck.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck= .py index fc1b077f3c64..5692f6eaf8bd 100755 --- a/BaseTools/Scripts/PatchCheck.py +++ b/BaseTools/Scripts/PatchCheck.py @@ -28,6 +28,10 @@ def run_git(*args): Result =3D p.communicate() return Result[0].decode('utf-8', 'ignore') if Result[0] and Result[0].= find(b"fatal") !=3D0 else None =20 +def printw(line): + """Print a warning to the console.""" + print(line) + class Verbose: SILENT, QUIET, ONELINE, NORMAL =3D range(4) level =3D NORMAL @@ -67,14 +71,14 @@ class CommitMessageCheck: =20 def error(self, *err): if self.ok and Verbose.level >=3D Verbose.QUIET: - print('The commit message format is not valid:') + printw('The commit message format is not valid:') self.ok =3D False if Verbose.level in [Verbose.SILENT, Verbose.ONELINE]: return count =3D 0 for line in err: prefix =3D (' *', ' ')[count > 0] - print(prefix, line) + printw("{}{}".format(prefix, line)) count +=3D 1 =20 # Find 'contributed-under:' at the start of a line ignoring case and @@ -415,14 +419,14 @@ class GitDiffCheck: =20 def error(self, *err): if self.ok and Verbose.level >=3D Verbose.QUIET: - print('Code format is not valid:') + printw('Code format is not valid:') self.ok =3D False if Verbose.level in [Verbose.SILENT, Verbose.ONELINE]: return count =3D 0 for line in err: prefix =3D (' *', ' ')[count > 0] - print(prefix, line) + printw("{}{}".format(prefix, line)) count +=3D 1 =20 class CheckOnePatch: --=20 2.21.0 -=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 (#51790): https://edk2.groups.io/g/devel/message/51790 Mute This Topic: https://groups.io/mt/67004076/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-