Use shutil.move to move result files in job.py
Since os.rename requires that the file is in the same partition with
the dest directory, we would get a python OSError if the result
directory is mounted to a nfs server (or different partition or
something else alike).
the traceback would be like:
Traceback (most recent call last):
File "/usr/local/kvm/kvm-test/bin/autotest", line 52, in ?
options.log)
File "/usr/local/kvm/kvm-test/bin/job.py", line 1274, in runjob
myjob.complete(0)
File "/usr/local/kvm/kvm-test/bin/job.py", line 798, in complete
os.rename(self.state_file, dest)
OSError: [Errno 18] Invalid cross-device link
Signed-off-by: Cao, Chen <kcao@redhat.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@3844 592f7852-d20e-0410-864c-8624ca9c26a4
1 file changed