Skip to content

Use shutil.move() instead of os.rename()

Compare
Choose a tag to compare
@mdmintz mdmintz released this 10 Aug 04:19
· 6737 commits to master since this release
805682c

Use shutil.move() instead of os.rename()

  • This is used for downloading the selenium server and placing it in the correct directory

Although os.rename() and shutil.move() will both rename files, the command that is closest to the Unix mv command is shutil.move(). The difference is that os.rename() doesn't work if the source and destination are on different disks, while shutil.move() doesn't care what disk the files are on.