summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2024-01-09 15:44:49 +0000
committerSteve Sakoman <steve@sakoman.com>2024-01-21 08:50:38 -1000
commit426dfdc8d246cae5f4fd37415ece280f169bee08 (patch)
tree311e34f6a2feb59529e2efde835b8afb17ca9b92 /scripts
parent924b38aa01bcdbe40b1e85ffa05c5dc9f0377733 (diff)
downloadpoky-426dfdc8d246cae5f4fd37415ece280f169bee08.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: ebd61290a644a6d9f2b3701e0e7ea050636da76c) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit 8d996616f0ca57220d939a41ca9ba6d696ea2a4f) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'scripts')
-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 707e7fe427..ce3af74e2b 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -703,7 +703,7 @@ def draw_processes_recursively(ctx, proc, proc_tree, y, proc_h, rect, clip) :
703 cmdString = proc.cmd 703 cmdString = proc.cmd
704 else: 704 else:
705 cmdString = '' 705 cmdString = ''
706 if (OPTIONS.show_pid or OPTIONS.show_all) and ipid is not 0: 706 if (OPTIONS.show_pid or OPTIONS.show_all) and ipid != 0:
707 cmdString = cmdString + " [" + str(ipid // 1000) + "]" 707 cmdString = cmdString + " [" + str(ipid // 1000) + "]"
708 if OPTIONS.show_all: 708 if OPTIONS.show_all:
709 if proc.args: 709 if proc.args:
@@ -801,7 +801,7 @@ class CumlSample:
801 if self.color is None: 801 if self.color is None:
802 i = self.next() % HSV_MAX_MOD 802 i = self.next() % HSV_MAX_MOD
803 h = 0.0 803 h = 0.0
804 if i is not 0: 804 if i != 0:
805 h = (1.0 * i) / HSV_MAX_MOD 805 h = (1.0 * i) / HSV_MAX_MOD
806 s = 0.5 806 s = 0.5
807 v = 1.0 807 v = 1.0