Skip to content

Commit 6ae3bd4

Browse files
committed
add warning for old para
1 parent f504648 commit 6ae3bd4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

py/selenium/webdriver/webkitgtk/service.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717
import typing
18+
import warnings
1819

1920
from selenium.webdriver.common import service
2021

@@ -36,17 +37,21 @@ def __init__(
3637
self,
3738
executable_path: str = DEFAULT_EXECUTABLE_PATH,
3839
port: int = 0,
40+
log_path: typing.Optional[str] = None,
3941
log_output: typing.Optional[str] = None,
4042
service_args: typing.Optional[typing.List[str]] = None,
4143
env: typing.Optional[typing.Mapping[str, str]] = None,
4244
**kwargs,
4345
) -> None:
4446
self.service_args = service_args or []
47+
if log_path is not None:
48+
warnings.warn("log_path is deprecated, use log_output instead", DeprecationWarning, stacklevel=2)
49+
log_path = open(log_path, "wb")
4550
log_output = open(log_output, "wb") if log_output else None
4651
super().__init__(
4752
executable_path=executable_path,
4853
port=port,
49-
log_output=log_output,
54+
log_output=log_path or log_output,
5055
env=env,
5156
**kwargs,
5257
)

0 commit comments

Comments
 (0)