Skip to content
This repository has been archived by the owner on Aug 12, 2021. It is now read-only.

Commit

Permalink
py: use dict getter to retrieve binary
Browse files Browse the repository at this point in the history
dict.get("foo") defaults to None if key "foo" is not found, which
is considered more Pythonic.
  • Loading branch information
andreastt committed Jan 20, 2016
1 parent 3395766 commit 6ba1617
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions py/selenium/webdriver/firefox/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ def __init__(self, firefox_profile=None, firefox_binary=None, timeout=30,

# marionette
if capabilities.get("marionette"):
if "binary" in capabilities:
self.binary = capabilities["binary"]
self.binary = capabilities.get("binary")
self.service = Service(executable_path, firefox_binary=self.binary)
self.service.start()

Expand Down

0 comments on commit 6ba1617

Please sign in to comment.