summaryrefslogtreecommitdiffstats
path: root/scripts/pybootchartgui
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2022-08-03 17:12:29 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-04 21:52:56 +0100
commit8d996616f0ca57220d939a41ca9ba6d696ea2a4f (patch)
tree8a5d7413d975e2ef296ab4162274e79c0d4536e4 /scripts/pybootchartgui
parent14c442bfe4886e6180bd58f5e69928efd54e9c3c (diff)
downloadopenembedded-core-8d996616f0ca57220d939a41ca9ba6d696ea2a4f.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: Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Diffstat (limited to 'scripts/pybootchartgui')
-rw-r--r--scripts/pybootchartgui/pybootchartgui/draw.py4
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) :
cmdString = proc.cmd
else:
cmdString = ''
- if (OPTIONS.show_pid or OPTIONS.show_all) and ipid is not 0:
+ if (OPTIONS.show_pid or OPTIONS.show_all) and ipid != 0:
cmdString = cmdString + " [" + str(ipid // 1000) + "]"
if OPTIONS.show_all:
if proc.args:
@@ -911,7 +911,7 @@ class CumlSample:
if self.color is None:
i = self.next() % HSV_MAX_MOD
h = 0.0
- if i is not 0:
+ if i != 0:
h = (1.0 * i) / HSV_MAX_MOD
s = 0.5
v = 1.0