|
@@ -5,6 +5,7 @@
|
|
|
# This software may be distributed under the terms of the GNU General
|
|
|
# Public License ("GPL") version 2 as published by the Free Software
|
|
|
# Foundation.
|
|
|
+from __future__ import print_function
|
|
|
|
|
|
import errno, os
|
|
|
|
|
@@ -33,7 +34,7 @@ def nsecs_str(nsecs):
|
|
|
return str
|
|
|
|
|
|
def add_stats(dict, key, value):
|
|
|
- if not dict.has_key(key):
|
|
|
+ if key not in dict:
|
|
|
dict[key] = (value, value, value, 1)
|
|
|
else:
|
|
|
min, max, avg, count = dict[key]
|
|
@@ -72,10 +73,10 @@ try:
|
|
|
except:
|
|
|
if not audit_package_warned:
|
|
|
audit_package_warned = True
|
|
|
- print "Install the audit-libs-python package to get syscall names.\n" \
|
|
|
- "For example:\n # apt-get install python-audit (Ubuntu)" \
|
|
|
- "\n # yum install audit-libs-python (Fedora)" \
|
|
|
- "\n etc.\n"
|
|
|
+ print("Install the audit-libs-python package to get syscall names.\n"
|
|
|
+ "For example:\n # apt-get install python-audit (Ubuntu)"
|
|
|
+ "\n # yum install audit-libs-python (Fedora)"
|
|
|
+ "\n etc.\n")
|
|
|
|
|
|
def syscall_name(id):
|
|
|
try:
|