From 5217c75ec032334e37fb23ef0b05f2a13c9072bd Mon Sep 17 00:00:00 2001 From: Aaron Simmons Date: Fri, 3 Jan 2014 15:11:09 -0700 Subject: [PATCH] making pidcat robust to when the loglevel isn't one of VDIWEF (!?) --- pidcat.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pidcat.py b/pidcat.py index 0de6d6e..4eb18c9 100755 --- a/pidcat.py +++ b/pidcat.py @@ -223,7 +223,7 @@ while adb.poll() is None: if owner not in pids: continue - if LOG_LEVELS_MAP[level] < min_level: + if level in LOG_LEVELS_MAP and LOG_LEVELS_MAP[level] < min_level: continue linebuf = '' @@ -240,8 +240,10 @@ while adb.poll() is None: linebuf += ' ' # write out level colored edge - if level not in TAGTYPES: break - linebuf += TAGTYPES[level] + if level in TAGTYPES: + linebuf += TAGTYPES[level] + else: + linebuf += ' ' + level + ' ' linebuf += ' ' # format tag message using rules