Skip to content

Commit 6885f83

Browse files
committed
Use shutil.move() instead of os.rename()
1 parent 3d37c16 commit 6885f83

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

seleniumbase/utilities/selenium_grid/download_selenium_server.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
""" Downloads the Selenium Server JAR file and renames it. """
22

33
import os
4+
import shutil
45
import sys
56
if sys.version_info[0] == 2:
67
from urllib import urlopen
@@ -45,9 +46,9 @@ def main(force_download=True):
4546
for filename in os.listdir("."):
4647
# If multiple copies exist, keep only the latest and rename it.
4748
if filename.startswith("selenium-server-standalone-"):
48-
os.rename(filename, RENAMED_JAR_FILE)
49+
shutil.move(filename, RENAMED_JAR_FILE)
4950
if FULL_DOWNLOAD_PATH != FULL_EXPECTED_PATH:
50-
os.rename(RENAMED_JAR_FILE, FULL_EXPECTED_PATH)
51+
shutil.move(RENAMED_JAR_FILE, FULL_EXPECTED_PATH)
5152
print("%s\n" % FULL_EXPECTED_PATH)
5253

5354

0 commit comments

Comments
 (0)