mirror of https://github.com/jumpserver/jumpserver
bugfix
parent
cf1da2a420
commit
1c61ed6a8b
|
@ -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():
|
||||
|
|
Loading…
Reference in New Issue