Skip to content

Commit 45dc304

Browse files
authored
[py] Fix driver service stop when starting browser fails (#15656)
[py] Fix Remote service stop
1 parent ac98d8f commit 45dc304

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/selenium/webdriver/remote/webdriver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ def start_session(self, capabilities: dict) -> None:
354354
self.session_id = response.get("sessionId")
355355
self.caps = response.get("capabilities")
356356
except Exception:
357-
if self.service is not None:
357+
if hasattr(self, "service") and self.service is not None:
358358
self.service.stop()
359359
raise
360360

0 commit comments

Comments
 (0)