Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[py] webkitgtk: log_path -> log_output #14618

Merged
merged 7 commits into from
Oct 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions py/selenium/webdriver/webkitgtk/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
import typing
import warnings

from selenium.webdriver.common import service

Expand All @@ -28,7 +29,7 @@ class Service(service.Service):
:param executable_path: install path of the WebKitWebDriver executable, defaults to `WebKitWebDriver`.
:param port: Port for the service to run on, defaults to 0 where the operating system will decide.
:param service_args: (Optional) List of args to be passed to the subprocess when launching the executable.
:param log_path: (Optional) File path for the file to be opened and passed as the subprocess stdout/stderr handler.
:param log_output: (Optional) File path for the file to be opened and passed as the subprocess stdout/stderr handler.
:param env: (Optional) Mapping of environment variables for the new process, defaults to `os.environ`.
"""

Expand All @@ -37,16 +38,20 @@ def __init__(
executable_path: str = DEFAULT_EXECUTABLE_PATH,
port: int = 0,
log_path: typing.Optional[str] = None,
log_output: typing.Optional[str] = None,
service_args: typing.Optional[typing.List[str]] = None,
env: typing.Optional[typing.Mapping[str, str]] = None,
**kwargs,
) -> None:
self.service_args = service_args or []
log_file = open(log_path, "wb") if log_path else None
if log_path is not None:
warnings.warn("log_path is deprecated, use log_output instead", DeprecationWarning, stacklevel=2)
log_path = open(log_path, "wb")
log_output = open(log_output, "wb") if log_output else None
super().__init__(
executable_path=executable_path,
port=port,
log_file=log_file,
log_output=log_path or log_output,
env=env,
**kwargs,
)
Expand Down
Loading