Commit 834bfd08 by 文周繁

fix: 修复部分程序无法用utf-8解码和asan程序未上传时报错的问题

parent ee44c51b
......@@ -50,7 +50,7 @@ def exec_command(crashes_collection, usage, command, seed_id: ObjectId):
error_cause = ''
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
_, errs = process.communicate()
errs = str(errs, "utf-8")
errs = str(errs, "utf-8", errors='ignore')
if usage == "valgrind":
err_data = ''
search_at_count = 0
......@@ -152,6 +152,7 @@ def main(argv):
fs = GridFS(default_db, fs_name)
# 根据ObjectId查找文件
print(software["asan_file"])
if software["asan_file"] is not None:
asan_file_data = fs.get(software["asan_file"])
if asan_file_data:
# 确保下载目录存在
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment