mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
refactor: avoid using temp files in sandbox.
This commit is contained in:
parent
8bfce62ad8
commit
24b8a7bab1
|
|
@ -100,7 +100,7 @@ except Exception as e:
|
|||
result_line = [line for line in lines if line.startswith(_id)]
|
||||
if not result_line:
|
||||
raise Exception("No result found.")
|
||||
result = json.loads(base64.b64decode(result_line[0].split(":", 1)[1]).decode())
|
||||
result = json.loads(base64.b64decode(result_line[-1].split(":", 1)[1]).decode())
|
||||
if result.get('code') == 200:
|
||||
return result.get('data')
|
||||
raise Exception(result.get('msg'))
|
||||
|
|
|
|||
Loading…
Reference in New Issue