Skip to content

Commit

Permalink
adjust condition for closing as well
Browse files Browse the repository at this point in the history
  • Loading branch information
asottile authored Nov 16, 2023
1 parent 0f03a04 commit df054db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py/selenium/webdriver/common/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def send_remote_shutdown_command(self) -> None:
def stop(self) -> None:
"""Stops the service."""

if self.log_output != PIPE:
if self.log_output not in {PIPE, subprocess.DEVNULL}:
if isinstance(self.log_output, IOBase):
self.log_output.close()
elif isinstance(self.log_output, int):
Expand Down

0 comments on commit df054db

Please sign in to comment.