Skip to content

Commit 1ea0f18

Browse files
[py] added pythonic approach of type checking in firefox/firefox_profile.py (#12271)
[py] added pythonic approach of type checking in firefox/firefox_profile.py
1 parent e822f4c commit 1ea0f18

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

py/selenium/webdriver/firefox/firefox_profile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def accept_untrusted_certs(self):
130130

131131
@accept_untrusted_certs.setter
132132
def accept_untrusted_certs(self, value) -> None:
133-
if value not in [True, False]:
133+
if not isinstance(value, bool):
134134
raise WebDriverException("Please pass in a Boolean to this call")
135135
self.set_preference("webdriver_accept_untrusted_certs", value)
136136

@@ -140,7 +140,7 @@ def assume_untrusted_cert_issuer(self):
140140

141141
@assume_untrusted_cert_issuer.setter
142142
def assume_untrusted_cert_issuer(self, value) -> None:
143-
if value not in [True, False]:
143+
if not isinstance(value, bool):
144144
raise WebDriverException("Please pass in a Boolean to this call")
145145

146146
self.set_preference("webdriver_assume_untrusted_issuer", value)

0 commit comments

Comments
 (0)