Skip to content

Commit 7ede1a3

Browse files
authored
Merge branch 'trunk' into pinned-browser-updates
2 parents 49db9ec + e8820b5 commit 7ede1a3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

py/selenium/webdriver/common/bidi/session.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,30 @@
1616
# under the License.
1717

1818

19-
def session_subscribe(*events, browsing_contexts=[]):
19+
def session_subscribe(*events, browsing_contexts=None):
2020
cmd_dict = {
2121
"method": "session.subscribe",
2222
"params": {
2323
"events": events,
2424
},
2525
}
26+
if browsing_contexts is None:
27+
browsing_contexts = []
2628
if browsing_contexts:
2729
cmd_dict["params"]["browsingContexts"] = browsing_contexts
2830
_ = yield cmd_dict
2931
return None
3032

3133

32-
def session_unsubscribe(*events, browsing_contexts=[]):
34+
def session_unsubscribe(*events, browsing_contexts=None):
3335
cmd_dict = {
3436
"method": "session.unsubscribe",
3537
"params": {
3638
"events": events,
3739
},
3840
}
41+
if browsing_contexts is None:
42+
browsing_contexts = []
3943
if browsing_contexts:
4044
cmd_dict["params"]["browsingContexts"] = browsing_contexts
4145
_ = yield cmd_dict

0 commit comments

Comments
 (0)