tracerepack: Don't fail when temp file is in different filesystem.
authorJosé Fonseca <jfonseca@vmware.com>
Mon, 13 Jun 2011 18:41:31 +0000 (19:41 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 13 Jun 2011 18:41:31 +0000 (19:41 +0100)
scripts/tracerepack.py

index 581ee37..028eb18 100755 (executable)
@@ -54,7 +54,7 @@ def repack(in_name):
     print '%u -> %u' % (in_size, out_size)
     
     if out_size < in_size:
-        os.rename(out_name, in_name)
+        shutil.move(out_name, in_name)
     else:
         os.unlink(out_name)