.pytool: Avoid "is" with a literal Python 3.8 warnings in CI plugins

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>
This commit is contained in:
Philippe Mathieu-Daude 2019-12-05 19:19:42 +08:00 committed by mergify[bot]
parent 0f9395d7c5
commit e8b9296c67
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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