This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 2dcd300a3c coredump.py:bug fix python file not have rename
2dcd300a3c is described below

commit 2dcd300a3c0721a85447f9bb0128df6f57227b31
Author: anjiahao <[email protected]>
AuthorDate: Wed Apr 17 20:21:30 2024 +0800

    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 <[email protected]>
---
 tools/coredump.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/coredump.py b/tools/coredump.py
index e6071442db..3b9a9d48d6 100755
--- a/tools/coredump.py
+++ b/tools/coredump.py
@@ -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)
 

Reply via email to