void-packages/srcpkgs/bootchart2/patches/python-3.9.patch
2021-01-26 19:46:04 +07:00

35 lines
1.1 KiB
Diff

Index: pybootchartgui/draw.py
===================================================================
--- pybootchartgui/draw.py.orig
+++ pybootchartgui/draw.py
@@ -508,7 +508,7 @@ def draw_processes_recursively(ctx, proc
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:
@@ -606,7 +606,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
Index: pybootchartgui/parsing.py
===================================================================
--- pybootchartgui/parsing.py.orig
+++ pybootchartgui/parsing.py
@@ -98,7 +98,7 @@ class Trace:
def compile(self, writer):
def find_parent_id_for(pid):
- if pid is 0:
+ if pid == 0:
return 0
ppid = self.parent_map.get(pid)
if ppid: