aboutsummaryrefslogtreecommitdiff
path: root/scripts/simpletrace.py
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2016-10-04 14:35:56 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2016-10-12 09:54:52 +0200
commitd1b97bcea3586bad572879f22437f44c690874cb (patch)
treeae4c793c7c4a4b44c1e4fab0a7de00f6bf60d41b /scripts/simpletrace.py
parent347701879ceaa9a03093364bc519042b248b4967 (diff)
trace: rename _read_events to read_events
The _read_events method is used by callers outside of its module, so should be a public method, not private. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: LluĂ­s Vilanova <vilanova@ac.upc.edu> Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1475588159-30598-18-git-send-email-berrange@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'scripts/simpletrace.py')
-rwxr-xr-xscripts/simpletrace.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/simpletrace.py b/scripts/simpletrace.py
index f40467a794..4ca903dc0c 100755
--- a/scripts/simpletrace.py
+++ b/scripts/simpletrace.py
@@ -12,7 +12,7 @@
import struct
import re
import inspect
-from tracetool import _read_events, Event
+from tracetool import read_events, Event
from tracetool.backend.simple import is_string
header_event_id = 0xffffffffffffffff
@@ -129,7 +129,7 @@ class Analyzer(object):
def process(events, log, analyzer, read_header=True):
"""Invoke an analyzer on each event in a log."""
if isinstance(events, str):
- events = _read_events(open(events, 'r'))
+ events = read_events(open(events, 'r'))
if isinstance(log, str):
log = open(log, 'rb')
@@ -188,7 +188,7 @@ def run(analyzer):
'<trace-file>\n' % sys.argv[0])
sys.exit(1)
- events = _read_events(open(sys.argv[1], 'r'))
+ events = read_events(open(sys.argv[1], 'r'))
process(events, sys.argv[2], analyzer, read_header=read_header)
if __name__ == '__main__':