Skip to content

Commit 53280c7

Browse files
Machinexa2AutomatedTester
Machinexa2
andauthored
General imports (#8947)
General imports Co-authored-by: David Burns <[email protected]>
1 parent de38e8d commit 53280c7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

py/selenium/webdriver/common/service.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717

1818
import errno
1919
import os
20-
import platform
2120
import subprocess
21+
from platform import system
2222
from subprocess import PIPE
23-
import time
23+
from time import sleep
2424
from selenium.common.exceptions import WebDriverException
2525
from selenium.webdriver.common import utils
2626

@@ -72,7 +72,7 @@ def start(self):
7272
cmd = [self.path]
7373
cmd.extend(self.command_line_args())
7474
self.process = subprocess.Popen(cmd, env=self.env,
75-
close_fds=platform.system() != 'Windows',
75+
close_fds=system() != 'Windows',
7676
stdout=self.log_file,
7777
stderr=self.log_file,
7878
stdin=PIPE,
@@ -103,7 +103,7 @@ def start(self):
103103
break
104104

105105
count += 1
106-
time.sleep(0.5)
106+
sleep(0.5)
107107
if count == 60:
108108
raise WebDriverException("Can not connect to the Service %s" % self.path)
109109

@@ -136,7 +136,7 @@ def send_remote_shutdown_command(self):
136136
if not self.is_connectable():
137137
break
138138
else:
139-
time.sleep(1)
139+
sleep(1)
140140

141141
def stop(self):
142142
"""

0 commit comments

Comments
 (0)