From b740328e4ac0412599884e0e32379002571e6fe4 Mon Sep 17 00:00:00 2001 From: Anders Date: Wed, 10 Mar 2010 14:31:06 +0100 Subject: [PATCH] Use find, not index to avoid exeptions on unknow proces states. find matches javas indexOf; index, confusingly, doesnt. Worksaround https://bugs.launchpad.net/bugs/512172 --- pybootchartgui/draw.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pybootchartgui/draw.py b/pybootchartgui/draw.py index c4a5321..35b82c6 100644 --- a/pybootchartgui/draw.py +++ b/pybootchartgui/draw.py @@ -107,7 +107,7 @@ # Convert ps process state to an int def get_proc_state(flag): - return "RSDTZXW".index(flag) + 1 + return "RSDTZXW".find(flag) + 1 def draw_text(ctx, text, color, x, y):