Skip to content

Commit 2961951

Browse files
committed
[py] Fix status_url
1 parent 3782c84 commit 2961951

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

py/selenium/webdriver/remote/server.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ def __init__(self, host=None, port=4444, path=None, version=None, env=None):
5959
self.env = env
6060

6161
self.process = None
62-
self.status_url = f"http://{self.host}:{self.port}/status"
62+
self.status_url = self._get_status_url()
63+
64+
def _get_status_url(self):
65+
host = self.host if self.host is not None else "localhost"
66+
return f"http://{host}:{self.port}/status"
6367

6468
def _validate_path(self, path):
6569
if path and not os.path.exists(path):

0 commit comments

Comments
 (0)