From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.81]) by mx.groups.io with SMTP id smtpd.web11.7667.1575544804406946947 for ; Thu, 05 Dec 2019 03:20:04 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BeHuROB3; spf=pass (domain: redhat.com, ip: 207.211.31.81, mailfrom: philmd@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575544803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1ZpxYm2PjHFknWYp4bD1msgY632Ch2440BsQcMLIEv4=; b=BeHuROB3o2p4CcVb+yN/UB59QXUOKz7uq1Vnw6ztDI8hKB0xkg4+f4qbE5pwGD6522H6Ds VfOIL9ctX6x4RvdxTLE1unlVhTH+tuFijtNXZHZ+66c3hvXGYzQlwklBnn5yl+lAaqkXmy 4rR59r6tQEJK0y7Uq0YKWDVfUO/kKAI= 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-153-lKtX6eSqNEy9EBt422-fSA-1; Thu, 05 Dec 2019 06:20:00 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C002B1856A7C; Thu, 5 Dec 2019 11:19:58 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-76.brq.redhat.com [10.40.205.76]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B7921691BC; Thu, 5 Dec 2019 11:19:55 +0000 (UTC) From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= To: devel@edk2.groups.io Cc: Sean Brogan , "Zhiju . Fan" , Bret Barkelew , Bob Feng , Liming Gao , Michael D Kinney , Philippe Mathieu-Daude Subject: [PATCH v2 2/2] .pytool: Avoid "is" with a literal Python 3.8 warnings in CI plugins Date: Thu, 5 Dec 2019 12:19:42 +0100 Message-Id: <20191205111942.19492-3-philmd@redhat.com> In-Reply-To: <20191205111942.19492-1-philmd@redhat.com> References: <20191205111942.19492-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MC-Unique: lKtX6eSqNEy9EBt422-fSA-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2304 To avoid SyntaxWarning with Python 3.8, change the 'is' operator by the conventional '=3D=3D' comparator. Cc: Sean Brogan Cc: Bret Barkelew Cc: Michael D Kinney Cc: Liming Gao Reviewed-by: Bob Feng Signed-off-by: Philippe Mathieu-Daude --- .pytool/Plugin/DscCompleteCheck/DscCompleteCheck.py | 2 +- .pytool/Plugin/LibraryClassCheck/LibraryClassCheck.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pytool/Plugin/DscCompleteCheck/DscCompleteCheck.py b/.pytool/= Plugin/DscCompleteCheck/DscCompleteCheck.py index e2485f570841..9af4f72c8de3 100644 --- a/.pytool/Plugin/DscCompleteCheck/DscCompleteCheck.py +++ b/.pytool/Plugin/DscCompleteCheck/DscCompleteCheck.py @@ -61,7 +61,7 @@ class DscCompleteCheck(ICiBuildPlugin): abs_dsc_path =3D os.path.join(abs_pkg_path, pkgconfig["DscPath"].s= trip()) wsr_dsc_path =3D Edk2pathObj.GetEdk2RelativePathFromAbsolutePath(a= bs_dsc_path) =20 - if abs_dsc_path is None or wsr_dsc_path is "" or not os.path.isfil= e(abs_dsc_path): + if abs_dsc_path is None or wsr_dsc_path =3D=3D "" or not os.path.i= sfile(abs_dsc_path): tc.SetSkipped() tc.LogStdError("Package Dsc not found") return 0 diff --git a/.pytool/Plugin/LibraryClassCheck/LibraryClassCheck.py b/.pytoo= l/Plugin/LibraryClassCheck/LibraryClassCheck.py index 5dafcbc13f8a..a62a7e912b15 100644 --- a/.pytool/Plugin/LibraryClassCheck/LibraryClassCheck.py +++ b/.pytool/Plugin/LibraryClassCheck/LibraryClassCheck.py @@ -67,7 +67,7 @@ class LibraryClassCheck(ICiBuildPlugin): abs_dec_path =3D self.__GetPkgDec(abs_pkg_path) wsr_dec_path =3D Edk2pathObj.GetEdk2RelativePathFromAbsolutePath(a= bs_dec_path) =20 - if abs_dec_path is None or wsr_dec_path is "" or not os.path.isfil= e(abs_dec_path): + if abs_dec_path is None or wsr_dec_path =3D=3D "" or not os.path.i= sfile(abs_dec_path): tc.SetSkipped() tc.LogStdError("No DEC file {0} in package {1}".format(abs_dec= _path, abs_pkg_path)) return -1 --=20 2.21.0