Skip to content

Commit 6a51561

Browse files
committed
Update console scripts
1 parent 375cfc7 commit 6a51561

File tree

1 file changed

+10
-2
lines changed
  • seleniumbase/console_scripts

1 file changed

+10
-2
lines changed

seleniumbase/console_scripts/run.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ def show_convert_usage():
152152
def show_translate_usage():
153153
print(" ** translate **")
154154
print(" Usage:")
155-
print(" seleniumbase translate [SB_FILE].py [LANGUAGE] [ACTION]")
156-
print(" OR: sbase translate [SB_FILE].py [LANGUAGE] [ACTION]")
155+
print(" seleniumbase translate [SB_FILE.py] [LANGUAGE] [ACTION]")
156+
print(" OR: sbase translate [SB_FILE.py] [LANGUAGE] [ACTION]")
157157
print(" Languages:")
158158
print(" --en / --English | --zh / --Chinese")
159159
print(" --nl / --Dutch | --fr / --French")
@@ -392,6 +392,14 @@ def main():
392392
show_convert_usage()
393393
elif command == "translate":
394394
if len(command_args) >= 1:
395+
if sys.version_info[0] == 2:
396+
colorama.init(autoreset=True)
397+
c5 = colorama.Fore.RED + colorama.Back.LIGHTYELLOW_EX
398+
cr = colorama.Style.RESET_ALL
399+
msg = "The SeleniumBase Translator does NOT support Python 2!"
400+
message = "\n" + c5 + msg + cr + "\n"
401+
print("")
402+
raise Exception(message)
395403
from seleniumbase.translate import translator
396404
translator.main()
397405
else:

0 commit comments

Comments
 (0)