Skip to content

Commit d468848

Browse files
committed
Add a retry when downloading a driver if that fails.
1 parent 0dddaab commit d468848

File tree

1 file changed

+7
-1
lines changed
  • seleniumbase/console_scripts

1 file changed

+7
-1
lines changed

seleniumbase/console_scripts/run.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -942,9 +942,15 @@ def main():
942942

943943
if command == "get" or command == "install":
944944
if len(command_args) >= 1:
945+
import time
945946
from seleniumbase.console_scripts import sb_install
946947

947-
sb_install.main()
948+
try:
949+
sb_install.main()
950+
except Exception:
951+
print("\nDriver download failed! Retrying in two seconds...")
952+
time.sleep(2)
953+
sb_install.main()
948954
else:
949955
show_basic_usage()
950956
show_install_usage()

0 commit comments

Comments
 (0)