public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Bob Feng" <bob.c.feng@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Feng, Bob C" <bob.c.feng@intel.com>,
	"philmd@redhat.com" <philmd@redhat.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>,
	"Fan, ZhijuX" <zhijux.fan@intel.com>,
	Bret Barkelew <Bret.Barkelew@microsoft.com>,
	"Gao, Liming" <liming.gao@intel.com>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] [PATCH 2/2] .pytool: Avoid "is" with a literal Python 3.8 warnings in CI plugins
Date: Thu, 5 Dec 2019 10:07:59 +0000	[thread overview]
Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D16157BF09@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <15DD71437DB6197D.24783@groups.io>

Hi Philippe,

Please add BZ link in the commit message. After adding that, Reviewed-by: Bob Feng <bob.c.feng@intel.com>

Thanks,
Bob

-----Original Message-----
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Bob Feng
Sent: Thursday, December 5, 2019 6:00 PM
To: devel@edk2.groups.io; philmd@redhat.com
Cc: Sean Brogan <sean.brogan@microsoft.com>; Fan, ZhijuX <zhijux.fan@intel.com>; Bret Barkelew <Bret.Barkelew@microsoft.com>; Gao, Liming <liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] [PATCH 2/2] .pytool: Avoid "is" with a literal Python 3.8 warnings in CI plugins

Reviewed-by: Bob Feng <bob.c.feng@intel.com>

-----Original Message-----
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Philippe Mathieu-Daudé
Sent: Tuesday, December 3, 2019 1:33 AM
To: devel@edk2.groups.io
Cc: Sean Brogan <sean.brogan@microsoft.com>; Fan, ZhijuX <zhijux.fan@intel.com>; Feng, Bob C <bob.c.feng@intel.com>; Bret Barkelew <Bret.Barkelew@microsoft.com>; Gao, Liming <liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Philippe Mathieu-Daude <philmd@redhat.com>
Subject: [edk2-devel] [PATCH 2/2] .pytool: Avoid "is" with a literal Python 3.8 warnings in CI plugins

To avoid SyntaxWarning with Python 3.8, change the 'is' operator by the conventional '==' comparator.

Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com>
---
 .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 = os.path.join(abs_pkg_path, pkgconfig["DscPath"].strip())
         wsr_dsc_path = Edk2pathObj.GetEdk2RelativePathFromAbsolutePath(abs_dsc_path)
 
-        if abs_dsc_path is None or wsr_dsc_path is "" or not os.path.isfile(abs_dsc_path):
+        if abs_dsc_path is None or wsr_dsc_path == "" or not os.path.isfile(abs_dsc_path):
             tc.SetSkipped()
             tc.LogStdError("Package Dsc not found")
             return 0
diff --git a/.pytool/Plugin/LibraryClassCheck/LibraryClassCheck.py b/.pytool/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 = self.__GetPkgDec(abs_pkg_path)
         wsr_dec_path = Edk2pathObj.GetEdk2RelativePathFromAbsolutePath(abs_dec_path)
 
-        if abs_dec_path is None or wsr_dec_path is "" or not os.path.isfile(abs_dec_path):
+        if abs_dec_path is None or wsr_dec_path == "" or not os.path.isfile(abs_dec_path):
             tc.SetSkipped()
             tc.LogStdError("No DEC file {0} in package {1}".format(abs_dec_path, abs_pkg_path))
             return -1
--
2.21.0








      parent reply	other threads:[~2019-12-05 10:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-02 17:33 [PATCH 0/2] Fix two Python 3.8 warnings Philippe Mathieu-Daudé
2019-12-02 17:33 ` [PATCH 1/2] BaseTools: Avoid "is" with a literal " Philippe Mathieu-Daudé
2019-12-05  9:58   ` Bob Feng
     [not found]   ` <15DD7135640BB2F8.32327@groups.io>
2019-12-05 10:09     ` [edk2-devel] " Bob Feng
2019-12-05 10:31       ` Philippe Mathieu-Daudé
2019-12-05 10:52         ` Bob Feng
2019-12-02 17:33 ` [PATCH 2/2] .pytool: Avoid "is" with a literal Python 3.8 warnings in CI plugins Philippe Mathieu-Daudé
2019-12-05  9:59   ` [edk2-devel] " Bob Feng
     [not found]   ` <15DD71437DB6197D.24783@groups.io>
2019-12-05 10:07     ` Bob Feng [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=08650203BA1BD64D8AD9B6D5D74A85D16157BF09@SHSMSX104.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox