aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2010-05-27 05:22:35 -0400
committerSteven Rostedt <rostedt@goodmis.org>2010-05-27 12:11:57 -0400
commitb530a23f0442be322b1717e6dbce2bd502634cb4 (patch)
tree59c00e404b3d36af4c8d45fe5e0f5085b9cc867c
parent6bf94a1fa0441c60142cd3aa9c6e0c42cd7ce402 (diff)
tracecmd.py: Complete Event dict abstraction
Apart from being immutable, Event instances should behave like a dict. Use the DictMixin to make them support the remaining features. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--tracecmd.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tracecmd.py b/tracecmd.py
index ad80ccd..75a639d 100644
--- a/tracecmd.py
+++ b/tracecmd.py
@@ -20,6 +20,7 @@
20 20
21from functools import update_wrapper 21from functools import update_wrapper
22from ctracecmd import * 22from ctracecmd import *
23from UserDict import DictMixin
23 24
24""" 25"""
25Python interface to the tracecmd library for parsing ftrace traces 26Python interface to the tracecmd library for parsing ftrace traces
@@ -50,7 +51,7 @@ def cached_property(func, name=None):
50 self.__cached_properties.pop(name, None) 51 self.__cached_properties.pop(name, None)
51 return property(_get, None, _del) 52 return property(_get, None, _del)
52 53
53class Event(object): 54class Event(object, DictMixin):
54 """ 55 """
55 This class can be used to access event data 56 This class can be used to access event data
56 according to an event's record and format. 57 according to an event's record and format.