Skip to content

Commit fc05b4e

Browse files
committed
Add more retry time for failed driver downloads
1 parent 8ea3c49 commit fc05b4e

File tree

1 file changed

+6
-6
lines changed
  • seleniumbase/console_scripts

1 file changed

+6
-6
lines changed

seleniumbase/console_scripts/run.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838

3939
import colorama
4040
import sys
41+
import time
4142
from seleniumbase.fixtures import constants
4243

4344
colorama.init(autoreset=True)
@@ -64,7 +65,6 @@ def show_usage():
6465

6566

6667
def show_basic_usage():
67-
import time
6868
from seleniumbase.console_scripts import logo_helper
6969

7070
seleniumbase_logo = logo_helper.get_seleniumbase_logo()
@@ -945,29 +945,29 @@ def main():
945945

946946
if command == "get" or command == "install":
947947
if len(command_args) >= 1:
948-
import time
949948
from seleniumbase.console_scripts import sb_install
950949

951950
need_retry = False
952951
need_another_retry = False
953-
retry_msg = "Unable to download driver! Retrying in 3 seconds..."
952+
retry_msg_1 = "* Unable to download driver! Retrying in 3s..."
953+
retry_msg_2 = "** Unable to download driver! Retrying in 5s..."
954954
try:
955955
sb_install.main()
956956
except Exception as e:
957957
invalid_run_cmd = constants.Warnings.INVALID_RUN_COMMAND
958958
if invalid_run_cmd in str(e):
959959
raise
960960
print()
961-
print(retry_msg)
961+
print(retry_msg_1)
962962
time.sleep(3)
963963
print()
964964
need_retry = True
965965
if need_retry:
966966
try:
967967
sb_install.main()
968968
except Exception:
969-
print(retry_msg)
970-
time.sleep(3)
969+
print(retry_msg_2)
970+
time.sleep(5)
971971
print()
972972
need_another_retry = True
973973
if need_another_retry:

0 commit comments

Comments
 (0)