]> code.ossystems Code Review - openembedded-core.git/commitdiff
buildstats: Replace 'is' with '==' in python condition check expression
authorKhem Raj <raj.khem@gmail.com>
Sun, 8 Dec 2019 21:42:11 +0000 (13:42 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 15 Dec 2019 09:04:38 +0000 (09:04 +0000)
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.

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

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

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/buildstats.bbclass

index 960653c704651ec1460dee648aebf1d286514883..2590c60c63a22c0fa6fdbc79ff8d9aeb31a6c2bf 100644 (file)
@@ -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")
         else:
             f.write("Status: FAILED \n")