mirror of
https://github.com/microsoft/autogen.git
synced 2025-11-09 06:14:03 +00:00
cleanup
This commit is contained in:
parent
41074d127f
commit
eb7b26a8ec
@ -265,12 +265,13 @@ def execute_code(
|
|||||||
return 1, TIMEOUT_MSG, None
|
return 1, TIMEOUT_MSG, None
|
||||||
if original_filename is None:
|
if original_filename is None:
|
||||||
os.remove(filepath)
|
os.remove(filepath)
|
||||||
abs_path = str(pathlib.Path(filepath).absolute())
|
|
||||||
else:
|
|
||||||
abs_path = str(pathlib.Path(work_dir).absolute()) + "/"
|
|
||||||
if result.returncode:
|
if result.returncode:
|
||||||
logs = result.stderr
|
logs = result.stderr
|
||||||
print(str(abs_path), logs)
|
if original_filename is None:
|
||||||
|
abs_path = str(pathlib.Path(filepath).absolute())
|
||||||
|
logs = logs.replace(str(abs_path), "").replace(filepath, "")
|
||||||
|
else:
|
||||||
|
abs_path = str(pathlib.Path(work_dir).absolute()) + "/"
|
||||||
logs = logs.replace(str(abs_path), "")
|
logs = logs.replace(str(abs_path), "")
|
||||||
else:
|
else:
|
||||||
logs = result.stdout
|
logs = result.stdout
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user