aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2010-05-15 05:48:20 -0400
committerJohannes Berg <johannes@sipsolutions.net>2010-05-25 07:17:02 -0400
commitb35925c88c357e4459636b53cb6081e9af9f07c3 (patch)
tree602a241d6c63b1e1458521eb2db87d0952d38fb4
parentc5a437d6903abaacc37ee3193414983f0192a55d (diff)
tracecmd.py: use alloc, not open
tracecmd_open will already read the header etc., whereas tracecmd_alloc doesn't and that is what is required here. Acked-by: Darren Hart <dvhltc@us.ibm.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
-rw-r--r--tracecmd.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tracecmd.py b/tracecmd.py
index 6b05e23..4ece0ef 100644
--- a/tracecmd.py
+++ b/tracecmd.py
@@ -86,7 +86,7 @@ class Trace(object):
86 used to manage the trace and extract events from it. 86 used to manage the trace and extract events from it.
87 """ 87 """
88 def __init__(self, filename): 88 def __init__(self, filename):
89 self.handle = tracecmd_open(filename) 89 self.handle = tracecmd_alloc(filename)
90 90
91 if tracecmd_read_headers(self.handle): 91 if tracecmd_read_headers(self.handle):
92 raise FileFormatError("Invalid headers") 92 raise FileFormatError("Invalid headers")