Blob Blame History Raw
From 1d2348027404307b6cd51c0c452207be27c64863 Mon Sep 17 00:00:00 2001
From: yonghong-song <ys114321@gmail.com>
Date: Thu, 11 Oct 2018 08:32:04 -0700
Subject: [PATCH] fix killsnoop.py srr/bytes type error (#2007)

Fix issue #2002

Signed-off-by: Yonghong Song <yhs@fb.com>
---
 tools/killsnoop.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/killsnoop.py b/tools/killsnoop.py
index 89ea5cd..d60c72e 100755
--- a/tools/killsnoop.py
+++ b/tools/killsnoop.py
@@ -139,7 +139,7 @@ print("%-9s %-6s %-16s %-4s %-6s %s" % (
     if (args.failed and (event.ret >= 0)):
         return
 
-    printb(b"%-9s %-6d %-16s %-4d %-6d %d" % (strftime("%H:%M:%S"),
+    printb(b"%-9s %-6d %-16s %-4d %-6d %d" % (strftime("%H:%M:%S").encode('ascii'),
         event.pid, event.comm, event.sig, event.tpid, event.ret))
 
 # loop with callback to print_event
-- 
2.17.2