[oe-commits] [openembedded-core] 12/12: buildstats: Replace 'is' with '==' in python condition check expression

git at git.openembedded.org git at git.openembedded.org
Sun Dec 15 00:19:13 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 1172226767f660689ba0bf10b078877414ec94a7
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Sun Dec 8 13:42:11 2019 -0800

    buildstats: Replace 'is' with '==' in python condition check expression
    
    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 at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/buildstats.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/buildstats.bbclass b/meta/classes/buildstats.bbclass
index 960653c..2590c60 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")
         else:
             f.write("Status: FAILED \n")

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list