mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-07-16 16:01:35 +00:00
bugfix
This commit is contained in:
parent
e07305ef46
commit
2f2289a863
@ -90,7 +90,10 @@ def renderJSON(script_path, time_file_path):
|
||||
offset = 0
|
||||
for t in timing:
|
||||
dt = scriptf.read(t[1])
|
||||
data = escapeString(dt)
|
||||
try:
|
||||
data = dt.encode('unicode_escape').decode('utf-8', 'ignore')
|
||||
except (UnicodeEncodeError, UnicodeDecodeError):
|
||||
data = dt.decode('utf-8', 'ignore')
|
||||
# print ('###### (%s, %s)' % (t[1], repr(data)))
|
||||
offset += t[0]
|
||||
ret[str(offset/float(1000))] = data
|
||||
|
Loading…
Reference in New Issue
Block a user