]> git.proxmox.com Git - mirror_edk2.git/commitdiff
.pytool: Avoid "is" with a literal Python 3.8 warnings in CI plugins
authorPhilippe Mathieu-Daude <philmd@redhat.com>
Thu, 5 Dec 2019 11:19:42 +0000 (19:19 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 6 Dec 2019 03:07:37 +0000 (03:07 +0000)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2304

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

Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com>
.pytool/Plugin/DscCompleteCheck/DscCompleteCheck.py
.pytool/Plugin/LibraryClassCheck/LibraryClassCheck.py

index e2485f570841b485bbfd02e4dbe6b92d4599e6ac..9af4f72c8de3a2a0dff462cfdca822be8cab6772 100644 (file)
@@ -61,7 +61,7 @@ class DscCompleteCheck(ICiBuildPlugin):
         abs_dsc_path = os.path.join(abs_pkg_path, pkgconfig["DscPath"].strip())\r
         wsr_dsc_path = Edk2pathObj.GetEdk2RelativePathFromAbsolutePath(abs_dsc_path)\r
 \r
-        if abs_dsc_path is None or wsr_dsc_path is "" or not os.path.isfile(abs_dsc_path):\r
+        if abs_dsc_path is None or wsr_dsc_path == "" or not os.path.isfile(abs_dsc_path):\r
             tc.SetSkipped()\r
             tc.LogStdError("Package Dsc not found")\r
             return 0\r
index 5dafcbc13f8adc4362cd5aa4ccc538d82ec38346..a62a7e912b15546e5de39f76b405ab66bfb9a143 100644 (file)
@@ -67,7 +67,7 @@ class LibraryClassCheck(ICiBuildPlugin):
         abs_dec_path = self.__GetPkgDec(abs_pkg_path)\r
         wsr_dec_path = Edk2pathObj.GetEdk2RelativePathFromAbsolutePath(abs_dec_path)\r
 \r
-        if abs_dec_path is None or wsr_dec_path is "" or not os.path.isfile(abs_dec_path):\r
+        if abs_dec_path is None or wsr_dec_path == "" or not os.path.isfile(abs_dec_path):\r
             tc.SetSkipped()\r
             tc.LogStdError("No DEC file {0} in package {1}".format(abs_dec_path, abs_pkg_path))\r
             return -1\r