Skip to content

Commit 6ba1617

Browse files
committed
py: use dict getter to retrieve binary
dict.get("foo") defaults to None if key "foo" is not found, which is considered more Pythonic.
1 parent 3395766 commit 6ba1617

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

py/selenium/webdriver/firefox/webdriver.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ def __init__(self, firefox_profile=None, firefox_binary=None, timeout=30,
5454

5555
# marionette
5656
if capabilities.get("marionette"):
57-
if "binary" in capabilities:
58-
self.binary = capabilities["binary"]
57+
self.binary = capabilities.get("binary")
5958
self.service = Service(executable_path, firefox_binary=self.binary)
6059
self.service.start()
6160

0 commit comments

Comments
 (0)