Skip to content

Commit

Permalink
py: test for existence of marionette key in capabilities
Browse files Browse the repository at this point in the history
The existing key checked for strict boolean equivalence, but using
surprising Python syntax (foo is True, rather than foo == True).
This changes it to be a loose truthyness check as suggested by
@Dude-x.
  • Loading branch information
andreastt committed Jan 19, 2016
1 parent 9e8d764 commit 3395766
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py/selenium/webdriver/firefox/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def __init__(self, firefox_profile=None, firefox_binary=None, timeout=30,
capabilities = DesiredCapabilities.FIREFOX

# marionette
if "marionette" in capabilities and capabilities["marionette"] is True:
if capabilities.get("marionette"):
if "binary" in capabilities:
self.binary = capabilities["binary"]
self.service = Service(executable_path, firefox_binary=self.binary)
Expand Down

0 comments on commit 3395766

Please sign in to comment.