File bcc-bsc1080085-fix-syscount-str.patch of Package bcc.13112

From 85db55338c0d3178903bc60a5b3b85a9bc24159b Mon Sep 17 00:00:00 2001
From: Gary Lin <glin@suse.com>
Date: Tue, 27 Mar 2018 15:54:09 +0800
Subject: [PATCH] tools/syscount: convert ausyscall output to string

In python3, subprocess.check_output() returns a byte array and it
failed the following split(). Convert the output to string to avoid
the error.

Signed-off-by: Gary Lin <glin@suse.com>
---
 tools/syscount.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/syscount.py b/tools/syscount.py
index a20d777..1f31bef 100755
--- a/tools/syscount.py
+++ b/tools/syscount.py
@@ -362,7 +362,7 @@ try:
     # Skip the first line, which is a header. The rest of the lines are simply
     # SYSCALL_NUM\tSYSCALL_NAME pairs.
     out = subprocess.check_output('ausyscall --dump | tail -n +2', shell=True)
-    syscalls = dict(map(parse_syscall, out.strip().split('\n')))
+    syscalls = dict(map(parse_syscall, out.decode().strip().split('\n')))
 except Exception as e:
     if platform.machine() == "x86_64":
         pass
-- 
2.16.2

openSUSE Build Service is sponsored by