projects
/
platform
/
upstream
/
bcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78948e4
)
syscount: Use zip_longest for Python 3 compatibility
author
Sasha Goldshtein
<goldshtn@gmail.com>
Sun, 26 Mar 2017 13:06:51 +0000
(13:06 +0000)
committer
Sasha Goldshtein
<goldshtn@gmail.com>
Sun, 26 Mar 2017 13:06:51 +0000
(13:06 +0000)
tools/syscount.py
patch
|
blob
|
history
diff --git
a/tools/syscount.py
b/tools/syscount.py
index
4f0e828
..
5bc3f34
100755
(executable)
--- a/
tools/syscount.py
+++ b/
tools/syscount.py
@@
-10,12
+10,17
@@
# 15-Feb-2017 Sasha Goldshtein Created this.
from bcc import BPF
-from itertools import izip_longest
from time import sleep, strftime
import argparse
+import itertools
import subprocess
import sys
+if sys.version_info.major < 3:
+ izip_longest = itertools.izip_longest
+else:
+ izip_longest = itertools.zip_longest
+
#
# Syscall table for Linux x86_64, not very recent.
# Automatically generated from strace/linux/x86_64/syscallent.h using the