Skip to content

Commit 38bf1e4

Browse files
committed
[py]: Use correct imports from urllib
1 parent 744b4bd commit 38bf1e4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

py/selenium/webdriver/common/service.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,10 @@ def is_connectable(self):
116116
return utils.is_connectable(self.port)
117117

118118
def send_remote_shutdown_command(self):
119-
from urllib import request as url_request
120-
URLError = url_request.URLError
121-
119+
from urllib import request
120+
from urllib.error import URLError
122121
try:
123-
url_request.urlopen("%s/shutdown" % self.service_url)
122+
request.urlopen("%s/shutdown" % self.service_url)
124123
except URLError:
125124
return
126125

0 commit comments

Comments
 (0)