未验证 提交 40cfe7b2 编写于 作者: 0 0x45f 提交者: GitHub

delete remove_static_file() function in error.py (#36153)

* change time to remove static tempfile

* delete remove_static_file() function
上级 021add61
...@@ -54,27 +54,9 @@ def attach_error_data(error, in_runtime=False): ...@@ -54,27 +54,9 @@ def attach_error_data(error, in_runtime=False):
setattr(error, ERROR_DATA, error_data) setattr(error, ERROR_DATA, error_data)
remove_static_file()
return error return error
def remove_static_file():
"""
Removes temporary files created during the transformation of dygraph to static graph.
"""
del_files = set()
for loc in global_origin_info_map:
static_filepath = loc[0]
del_files.add(static_filepath)
filename, extension = os.path.splitext(static_filepath)
del_files.add(filename + ".pyc")
for filepath in del_files:
if os.path.exists(filepath):
os.remove(filepath)
class TraceBackFrame(OriginInfo): class TraceBackFrame(OriginInfo):
""" """
Traceback frame information. Traceback frame information.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册