diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2022-08-03 17:12:29 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-04 21:53:50 +0100 |
commit | 15c7fc317495ce8383f99f542cae6592ac0ea816 (patch) | |
tree | c9e0ee6d71759f3c6f92c8988f5b2e58b9a11f95 | |
parent | fcb754793d0b06a69105f8280aff9a13dec67827 (diff) | |
download | poky-15c7fc317495ce8383f99f542cae6592ac0ea816.tar.gz |
pybootchartgui: fix 2 SyntaxWarnings
scripts/pybootchartgui/pybootchartgui/draw.py:820: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if (OPTIONS.show_pid or OPTIONS.show_all) and ipid is not 0:
scripts/pybootchartgui/pybootchartgui/draw.py:918: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if i is not 0:
(From OE-Core rev: 8d996616f0ca57220d939a41ca9ba6d696ea2a4f)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | scripts/pybootchartgui/pybootchartgui/draw.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py index 3926bdd11e..4e04b06427 100644 --- a/scripts/pybootchartgui/pybootchartgui/draw.py +++ b/scripts/pybootchartgui/pybootchartgui/draw.py | |||
@@ -813,7 +813,7 @@ def draw_processes_recursively(ctx, proc, proc_tree, y, proc_h, rect, clip) : | |||
813 | cmdString = proc.cmd | 813 | cmdString = proc.cmd |
814 | else: | 814 | else: |
815 | cmdString = '' | 815 | cmdString = '' |
816 | if (OPTIONS.show_pid or OPTIONS.show_all) and ipid is not 0: | 816 | if (OPTIONS.show_pid or OPTIONS.show_all) and ipid != 0: |
817 | cmdString = cmdString + " [" + str(ipid // 1000) + "]" | 817 | cmdString = cmdString + " [" + str(ipid // 1000) + "]" |
818 | if OPTIONS.show_all: | 818 | if OPTIONS.show_all: |
819 | if proc.args: | 819 | if proc.args: |
@@ -911,7 +911,7 @@ class CumlSample: | |||
911 | if self.color is None: | 911 | if self.color is None: |
912 | i = self.next() % HSV_MAX_MOD | 912 | i = self.next() % HSV_MAX_MOD |
913 | h = 0.0 | 913 | h = 0.0 |
914 | if i is not 0: | 914 | if i != 0: |
915 | h = (1.0 * i) / HSV_MAX_MOD | 915 | h = (1.0 * i) / HSV_MAX_MOD |
916 | s = 0.5 | 916 | s = 0.5 |
917 | v = 1.0 | 917 | v = 1.0 |