[edk2-devel] [PATCH v2 2/2] .pytool: Avoid "is" with a literal Python 3.8 warnings in CI plugins
Philippe Mathieu-Daudé
philmd at redhat.com
Thu Dec 5 11:19:42 UTC 2019
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 at microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew at microsoft.com>
Cc: Michael D Kinney <michael.d.kinney at intel.com>
Cc: Liming Gao <liming.gao at intel.com>
Reviewed-by: Bob Feng <bob.c.feng at intel.com>
Signed-off-by: Philippe Mathieu-Daude <philmd at 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
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#51785): https://edk2.groups.io/g/devel/message/51785
Mute This Topic: https://groups.io/mt/66951245/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list