diff --git a/jlog/log_api.py b/jlog/log_api.py index 669960312..89b76d4be 100644 --- a/jlog/log_api.py +++ b/jlog/log_api.py @@ -84,7 +84,16 @@ def renderJSON(script_path, time_file_path): # with open(script_path) as scriptf: with open(time_file_path) as timef: timing = getTiming(timef) - json = scriptToJSON(scriptf, timing) + ret = {} + with closing(scriptf): + scriptf.readline() # ignore first header line from script file + offset = 0 + for t in timing: + dt = scriptf.read(t[1]) + data = escapeString(dt) + # print ('###### (%s, %s)' % (t[1], repr(data))) + offset += t[0] + ret[str(offset/float(1000))] = data return json def kill_invalid_connection():