File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
py/selenium/webdriver/remote Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -105,13 +105,9 @@ def __init__(
105105 self .extra_headers = extra_headers
106106
107107 self .timeout = (
108- (
109- float (os .getenv ("GLOBAL_DEFAULT_TIMEOUT" , str (socket .getdefaulttimeout ())))
110- if os .getenv ("GLOBAL_DEFAULT_TIMEOUT" ) is not None
111- else socket .getdefaulttimeout ()
112- )
113- if timeout is None
114- else timeout
108+ float (os .getenv ("GLOBAL_DEFAULT_TIMEOUT" ))
109+ if os .getenv ("GLOBAL_DEFAULT_TIMEOUT" ) is not None
110+ else (timeout if timeout is not None else socket .getdefaulttimeout ())
115111 )
116112
117113 self .ca_certs = (
@@ -122,7 +118,11 @@ def __init__(
122118
123119 def reset_timeout (self ) -> None :
124120 """Resets the timeout to the default value of socket."""
125- self ._timeout = socket .getdefaulttimeout ()
121+ self ._timeout = (
122+ float (os .getenv ("GLOBAL_DEFAULT_TIMEOUT" ))
123+ if os .getenv ("GLOBAL_DEFAULT_TIMEOUT" ) is not None
124+ else socket .getdefaulttimeout ()
125+ )
126126
127127 def get_proxy_url (self ) -> Optional [str ]:
128128 """Returns the proxy URL to use for the connection."""
You can’t perform that action at this time.
0 commit comments