diff mbox series

buildstats: Replace 'is' with '==' in python condition check expression

Message ID 20191208214211.3286056-1-raj.khem@gmail.com
State Accepted
Commit c3cb6bc21f3f84e2ed103b6438516ab85222faa9
Headers show
Series buildstats: Replace 'is' with '==' in python condition check expression | expand

Commit Message

Khem Raj Dec. 8, 2019, 9:42 p.m. UTC
python 3.8 has started to throw this as a warning but usage is wrong see
[1], it seems to be working by accident and not design.

SyntaxWarning: "is" with a literal. Did you mean "=="?

[1]: https://bugs.python.org/issue34850

Signed-off-by: Khem Raj <raj.khem@gmail.com>

 meta/classes/buildstats.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Openembedded-core mailing list
diff mbox series


diff --git a/meta/classes/buildstats.bbclass b/meta/classes/buildstats.bbclass
index 960653c704..2590c60c63 100644
--- a/meta/classes/buildstats.bbclass
+++ b/meta/classes/buildstats.bbclass
@@ -100,7 +100,7 @@  def write_task_data(status, logfile, e, d):
                 f.write("rusage %s: %s\n" % (i, getattr(resources, i)))
             for i in rusages:
                 f.write("Child rusage %s: %s\n" % (i, getattr(childres, i)))
-        if status is "passed":
+        if status == "passed":
             f.write("Status: PASSED \n")
             f.write("Status: FAILED \n")