coredump.py:bug fix python file not have rename

tmpfile.rename(args.output)
    ^^^^^^^^^^^^^^
AttributeError: '_io.BufferedRandom' object has no attribute 'rename'. Did you mean: 'name'?

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
anjiahao 2024-04-17 20:21:30 +08:00 committed by Xiang Xiao
parent f6facf7602
commit 2dcd300a3c

View file

@ -134,8 +134,8 @@ def main():
outfile.close()
os.unlink(tmp)
else:
tmpfile.rename(args.output)
tmpfile.close()
os.rename(tmp, args.output)
print("Core file conversion completed: " + args.output)