File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -40,39 +40,37 @@ class bcolors:
4040 chromeOps .add_argument ('--no-sandbox' )
4141 chromedriver_path = os .path .abspath ("test/chromium/chromedriver" )
4242
43- # First argument is optional, if not specified will search path.
4443
4544try :
45+ # First argument is optional, if not specified will search path.
4646 driver = webdriver .Chrome (chromedriver_path , chrome_options = chromeOps )
4747except WebDriverException as e :
4848 error = e .__str__ ()
4949
5050 if "executable needs to be in PATH" in e .__str__ ():
51- print "ChromeDriver isn't installed. Check test/chrome/README.md\
52- for instructions on how to install ChromeDriver"
51+ print "ChromeDriver isn't installed. Check test/chrome/README.md " \
52+ " for instructions on how to install ChromeDriver"
5353
5454 sys .exit (2 )
5555 else :
5656 raise e
5757
58- print '' #New line
58+ print ''
5959
6060driver .get ('http://libssh.org/robots.txt' )
6161
62- #Page Loaded
63-
64- failed = False
62+ test_failed = False
6563if driver .current_url .startswith ('https' ):
6664 print bcolors .OKGREEN + "HTTP to HTTPS redirection successful" + bcolors .ENDC
6765elif driver .current_url .startswith ('http' ):
6866 print bcolors .FAIL + "HTTP to HTTPS redirection failed" + bcolors .ENDC
69- failed = True
67+ test_failed = True
7068 sys .exit (1 )
7169
72- print '' #New line
70+ print ''
7371
7472driver .quit ()
7573
7674
77- if failed :
75+ if test_failed :
7876 sys .exit (1 )
You can’t perform that action at this time.
0 commit comments